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.error
if the result contains an errorThrows
ResultError.empty
if the result contains no error but also no result.Declaration
Swift
@discardableResult public func unwrap() throws -> UnsafeMutableRawPointer
Return Value
The pointer to the successful result value.
-
Unwraps an optional result, yielding either a successful value or a nil.
Throws
ResultError.error
if 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.