Result
struct Result
Undocumented
-
Force unwraps a result. Expects there to be a value attached and throws an error is there is not.
Throws
ResultError.errorif the result contains an errorThrows
ResultError.emptyif the result contains no error but also no result.Declaration
Swift
@discardableResult public func unwrap() throws -> UnsafeMutableRawPointerReturn Value
The pointer to the successful result value.
-
Unwraps an optional result, yielding either a successful value or a nil.
Throws
ResultError.errorif the result contains an errorDeclaration
Swift
@discardableResult public func tryUnwrap() throws -> UnsafeMutableRawPointer?Return Value
The pointer to the successful result value, or nil if no value is present.
Result Extension Reference