Avatar
swiftNightly BOT 12/14/2018 2:26 AM
@_frozen enum Result<Success, Failure> where Failure : Error { case success(Success) case failure(Failure) func map<NewSuccess>(_ transform: (Success) -> NewSuccess) -> Result<NewSuccess, Failure> func mapError<NewFailure>(_ transform: (Failure) -> NewFailure) -> Result<Success, NewFailure> where NewFailure : Error func flatMap<NewSuccess>(_ transform: (Success) -> Result<NewSuccess, Failure>) -> Result<NewSuccess, Failure> func flatMapError<NewFailure>(_ transform: (Failure) -> Result<Success, NewFailure>) -> Result<Success, NewFailure> where NewFailure : Error func get() throws -> Success } extension Result where Failure == Error { init(catching body: () throws -> Success) } extension Result : Equatable where Success : Equatable, Failure : Equatable { static func == (a: Result<Success, Failure>, b: Result<Success, Failure>) -> Bool } extension Result : Hashable where Success : Hashable, Failure : Hashable { var hashValue: Int { get } func hash(into hasher: inout Hasher) }