Result
extension Result
extension Result: CustomStringConvertible
extension Result: CustomDebugStringConvertible
-
Returns
trueif the result is a success,falseotherwise.Declaration
Swift
public var isSuccess: Bool { get } -
Returns
trueif the result is a failure,falseotherwise.Declaration
Swift
public var isFailure: Bool { get } -
Returns the associated value if the result is a success,
nilotherwise.Declaration
Swift
public var value: Success? { get } -
Returns the associated error value if the result is a failure,
nilotherwise.Declaration
Swift
public var error: Error? { get } -
The textual representation used when written to an output stream, which includes whether the result was a success or failure.
Declaration
Swift
public var description: String { get } -
The debug textual representation used when written to an output stream, which includes whether the result was a success or failure in addition to the value or error.
Declaration
Swift
public var debugDescription: String { get }
View on GitHub
Result Extension Reference