Returns the value contained inside of an Result or Option Enum or returns if failure.
1 2 3 4 5
Enumerated value of type Result or Option to unwrap
objects to be passed to methods.
This is similar to
unwrap for Result and Option objects. However,
None variant does not cause execution to stop. Instead, the parent
function immediately returns the Enum intact. Inspired by the
? operator in Rust.
an object of any class or
x if failure.
!.Result: Unwrap Result if Ok, otherwise return the Err variant in the parent function.
!.Option: Unwrap Option if Some, otherwise return the None variant in the parent function.
1 2 3 4 5 6 7 8 9 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.