関数 | Result<T, E> |
Option<T> |
---|---|---|
() -> bool |
is_ok、is_err | is_some、is_none |
() -> T |
unwrap、unwrap_or_default、expect(&str) | unwrap、unwrap_or_default、expect(&str) |
() -> E |
unwrap_err、expect_err(&str) | |
(T) -> T |
unwrap_or | unwrap_or |
((E) -> T) -> T 1
|
unwrap_or_else | unwrap_or_else |
((T) -> U) -> Self |
map | map |
(U, (T) -> U) -> Self |
map_or | map_or |
((E) -> U, (T) -> U) -> Self 1
|
map_or_else | map_or_else |
((E) -> F) -> Self |
map_err | |
(Self) -> Self |
and、or | and、or、xor |
((T) -> Self) -> Self |
and_then | and_then |
((E) -> Self) -> Self 1
|
or_else | or_else |
Result<T, E> <-> Option<T> |
ok | ok_or(E)、ok_or_else(() -> E) |
Result<E, T> <-> Option<T> |
err |
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme