Contents

constrain(_:)

Applies all value constraints to a given attribute container.

Declaration

func constrain(_ container: inout AttributeContainer)

Discussion

Modifies the given container by applying all AttributedTextValueConstraints that are part of this definition to the container.

Use this function to test your AttributedTextFormattingDefinition, or to ensure your constraints are applied before passing content to API that cannot itself apply the definition.