Result

@_frozen
enum Result<Success, Failure> where Failure : Error
  • Undocumented

    Declaration

    Swift

    func toEither() -> Either<Failure, Success>
  • Undocumented

    Declaration

    Swift

    func toTry() -> Try<Success>
  • Undocumented

    Declaration

    Swift

    func toValidated() -> Validated<Failure, Success>
  • Undocumented

    Declaration

    Swift

    func toOption() -> Option<Success>
  • Undocumented

    Declaration

    Swift

    func fold<B>(_ ifFailure: @escaping (Failure) -> B,
                 _ ifSuccess: @escaping (Success) -> B) -> B