Result

enum Result<Value, Error> : ResultProtocol, CustomStringConvertible, CustomDebugStringConvertible where Error : Error
  • Undocumented

    Declaration

    Swift

    public func toEither() -> Either<Error, Value>
  • Undocumented

    Declaration

    Swift

    public func toTry() -> Try<Value>
  • Undocumented

    Declaration

    Swift

    public func toValidated() -> Validated<Error, Value>
  • Undocumented

    Declaration

    Swift

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

    Declaration

    Swift

    func fold<B>(_ ifFailure : @escaping (Error) -> B,
                 _ ifSuccess : @escaping (Value) -> B) -> B