Structures

The following structures are available globally.

  • A type-erased Constraint.

    See more

    Declaration

    Swift

    public struct AnyConstraint<T, E> : Constraint where E : Error
  • Undocumented

    See more

    Declaration

    Swift

    public struct CompoundConstraint<T, E> : Constraint where E : Error
  • A data type that links a Predicate to an Error that describes why the predicate evaluation has failed.

    See more

    Declaration

    Swift

    public struct ConditionedConstraint<T, E> : Constraint where E : Error
  • Undocumented

    See more

    Declaration

    Swift

    public struct KeyPathConstraint<T, V, E> : Constraint where E : Error
  • A data type that links a Predicate to an Error that describes why the predicate evaluation has failed.

    See more

    Declaration

    Swift

    public struct PredicateConstraint<T, E> : Constraint where E : Error
  • Undocumented

    See more

    Declaration

    Swift

    public struct TypeConstraint<T, E> : Constraint where E : Error
  • The summary of a validation result.

    See more

    Declaration

    Swift

    public struct Summary<E> : Error where E : Error
    extension Summary: Equatable
  • A type-erased Predicate.

    See more

    Declaration

    Swift

    public struct AnyPredicate<T> : Predicate
  • The BlockPredicate struct is used to define closure based conditions used to evaluate generic inputs.

    See more

    Declaration

    Swift

    public struct BlockPredicate<T> : Predicate
  • The CharacterSetPredicate struct is used to evaluate a String inputs agains a defined CharacterSet.

    See more

    Declaration

    Swift

    public struct CharacterSetPredicate : Predicate
  • The EmailPredicate struct is used to evaluate whether a given input is a syntactically valid email address, based on the RFC 5322 official standard.

    See more

    Declaration

    Swift

    public struct EmailPredicate : Predicate
  • The LengthPredicate struct is used to evaluate whether a given input is of a given length.

    See more

    Declaration

    Swift

    public struct LengthPredicate<T> : Predicate where T : Collection
  • The PairMatchingPredicate struct is used to evaluate whether a given pair of values match.

    See more

    Declaration

    Swift

    public struct PairMatchingPredicate<T> : Predicate where T : Equatable
  • The RangePredicate struct is used to evaluate whether a given input is inside a given range.

    let drinkingAgeLimit = RangePredicate(min: 21)
    let isAllowed = drinkingAgeLimit.evaluate(with: 18)
    
    See more

    Declaration

    Swift

    public struct RangePredicate<T> : Predicate where T : Comparable
  • The RegexPredicate struct is used to define regluar expression based conditions used to evaluate input strings.

    See more

    Declaration

    Swift

    public struct RegexPredicate : Predicate
  • The RequiredPredicate struct is used to evaluate whether a given input is empty.

    See more

    Declaration

    Swift

    public struct RequiredPredicate<T> : Predicate where T : Collection
  • The URLPredicate struct is used to evaluate whether a given input is a syntactically valid URL.

    See more

    Declaration

    Swift

    public struct URLPredicate : Predicate