Skip to content

unwrap(_:into:description:)

mattpolzin edited this page Oct 1, 2020 · 2 revisions

unwrap(_:into:description:)

Unwrap the value pointed to by the KeyPath. Fail with a ValidationError if the value is nil or pass onto each validation provided otherwise.

public func unwrap<T, U>(_ path: KeyPath<ValidationContext<T>, U?>, into validations: Validation<U>, description: String? = nil) -> (ValidationContext<T>) -> [ValidationError]

See lift<T, U>(_:,into:) for more information on what this function does when the value pointed to is non-nil.

unwrap(_:into:description:)

Unwrap the value pointed to by the KeyPath. Fail with a ValidationError if the value is nil or pass onto each validation provided otherwise.

public func unwrap<T, U>(_ path: KeyPath<T, U?>, into validations: Validation<U>, description: String? = nil) -> (ValidationContext<T>) -> [ValidationError]

See lift<T, U>(_:,into:) for more information on what this function does when the value pointed to is non-nil.

Types
Protocols
Global Functions
Extensions
Clone this wiki locally