Result

extension Result
extension Result: CustomStringConvertible
extension Result: CustomDebugStringConvertible
  • Returns true if the result is a success, false otherwise.

    Declaration

    Swift

    public var isSuccess: Bool { get }
  • Returns true if the result is a failure, false otherwise.

    Declaration

    Swift

    public var isFailure: Bool { get }
  • Returns the associated value if the result is a success, nil otherwise.

    Declaration

    Swift

    public var value: Success? { get }
  • Returns the associated error value if the result is a failure, nil otherwise.

    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 }