AsyncConstraint
public protocol AsyncConstraint
The AsyncConstraint
protocol is used to define the structre that must be implemented by concrete asynchronous constraints.
-
A type that provides information about what kind of values the constraint can be evaluated with.
Declaration
Swift
associatedtype InputType
-
Asynchronous evaluates the input on the provided queue.
Declaration
Parameters
input
The input to be validated.
queue
The queue on which the completion handler is executed.
completionHandler
The completion handler to call when the evaluation is complete. It takes a
Bool
parameter:result
.success
if the input is valid,.failure
containing theSummary
of the failingConstraint
s otherwise.