Result

extension Result
extension Result: @retroactive CustomStringConvertible where Success == Void, Failure == WebcomError
  • A function that takes a Result parameter and returns nothing.

    It is typically used for a callback function, receiving asynchronously a Result.

    Declaration

    Swift

    public typealias Callback = (Result) -> Void
  • The success value of this result or nil when it represents a failure.

    This property is equivalent to:

    try? get()
    

    Declaration

    Swift

    public var value: Success? { get }
  • A Result obtained by discarding any success value from this value.

    It is typically used to simplify a result, when it is only needed to know that an operation was successful but the success value does not matter.

    Declaration

    Swift

    public var void: Result<Void, Failure> { get }

Available where Success == Void, Failure == WebcomError

  • Declaration

    Swift

    public var description: String { get }