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