Protocols
The following protocols are available globally.
-
The
See moreConstraint
protocol is used to define the structure that must be implemented by concrete constraints.Declaration
Swift
public protocol Constraint : AsyncConstraint
-
The
See moreAsyncConstraint
protocol is used to define the structure that must be implemented by concrete asynchronous constraints.Declaration
Swift
public protocol AsyncConstraint
-
The
Predicate
protocol defines the structure that must be implemented by concrete predicates.
See morepublic struct CopyCatPredicate: Predicate { private let value: String public init(value: String) { self.value = value } public func evaluate(with input: String) -> Bool { return input == value } } let predicate = CopyCatPredicate(value: "alphabet") let isIdentical = predicate.evaluate(with: "alphabet")
Declaration
Swift
public protocol Predicate : AsyncPredicate
-
The
See moreAsyncPredicate
protocol defines the structure that must be implemented by concrete async predicates.Declaration
Swift
public protocol AsyncPredicate