call method
T
call()
Shortcut to call Option.unwrap().
Allows calling an Option
value like a function as a shortcut to unwrap the
held value of the Option
.
Warning: This is an unsafe operation. An OptionError will be thrown if this operation is used on a None value. You can take advantage of this safely via catchOption/catchOptionAsync.
var foo = Some(1);
var bar = Some(2);
print(foo() + bar()); // prints: 3
See also:
Rust: Option::unwrap()
Implementation
T call() => unwrap();