Validated

public class Validated<E, A> : ValidatedOf<E, A>

Undocumented

  • Undocumented

    Declaration

    Swift

    public static func valid(_ value: A) -> Validated<E, A>
  • Undocumented

    Declaration

    Swift

    public static func invalid(_ value: E) -> Validated<E, A>
  • Undocumented

    Declaration

    Swift

    public static func fromTry(_ t: Try<A>) -> Validated<Error, A>
  • Undocumented

    Declaration

    Swift

    public static func fromOption(_ m: Option<A>, ifNone: @escaping () -> E) -> Validated<E, A>
  • Undocumented

    Declaration

    Swift

    public static func fix(_ fa: ValidatedOf<E, A>) -> Validated<E, A>
  • Undocumented

    Declaration

    Swift

    public func fold<C>(_ fe: (E) -> C, _ fa: (A) -> C) -> C
  • Undocumented

    Declaration

    Swift

    public var isValid: Bool { get }
  • Undocumented

    Declaration

    Swift

    public var isInvalid: Bool { get }
  • Undocumented

    Declaration

    Swift

    public func exists(_ predicate: (A) -> Bool) -> Bool
  • Undocumented

    Declaration

    Swift

    public func toEither() -> Either<E, A>
  • Undocumented

    Declaration

    Swift

    public func toOption() -> Option<A>
  • Undocumented

    Declaration

    Swift

    public func toArray() -> [A]
  • Undocumented

    Declaration

    Swift

    public func withEither<EE, B>(_ f: (Either<E, A>) -> Either<EE, B>) -> Validated<EE, B> where EE : Semigroup
  • Undocumented

    Declaration

    Swift

    public func swap() -> Validated<A, E>
  • Undocumented

    Declaration

    Swift

    public func getOrElse(_ defaultValue: A) -> A
  • Undocumented

    Declaration

    Swift

    public func valueOr(_ f: (E) -> A) -> A
  • Undocumented

    Declaration

    Swift

    public func orElse(_ defaultValue: Validated<E, A>) -> Validated<E, A>
  • Undocumented

    Declaration

    Swift

    public static func toPEither<E2, B>() -> PIso<Validated<E, A>, Validated<E2, B>, Either<E, A>, Either<E2, B>>
  • Undocumented

    Declaration

    Swift

    public static func toEither() -> Iso<Validated<E, A>, Either<E, A>>
  • Undocumented

    Declaration

    Swift

    public static func toPTry<B>() -> PIso<Validated<Error, A>, Validated<Error, B>, Try<A>, Try<B>>
  • Undocumented

    Declaration

    Swift

    public static func toTry() -> Iso<Validated<Error, A>, Try<A>>
  • Undocumented

    Declaration

    Swift

    public func toResult() -> Result<A, E>
  • Declaration

    Swift

    public var description: String { get }
  • Declaration

    Swift

    public var debugDescription: String { get }