Extensions on
Result
Properties
nonSuccessResult
@available(*, deprecated, message: "Will be removed at version 3")
public var nonSuccessResult: Self?
Get non success Result, if current Result is success return nil, if not return self
nonFailureResult
@available(*, deprecated, message: "Will be removed at version 3")
public var nonFailureResult: Self?
Get non failure Result, if current Result is failure return nil, if not return self
value
@available(*, deprecated, renamed: "successValue")
public var value: Success!
Force get value from Result, make sure you make sure your Result is not failure.
error
@available(*, deprecated, renamed: "failureValue")
public var error: Error!
Get error value from Result
Methods
getAndForget()
@discardableResult
public func getAndForget() throws -> Success
Get result value and discard the returnable value
This function is wrapper of get
function with discardable result