Trait try_map::FlipResultExt
[−]
[src]
pub trait FlipResultExt<T> { type ReturnType; fn flip(self) -> Self::ReturnType; }
Extend Option<Result<T>>
and Vecflip
method that scavenges the inner Result
type and brings it to the outernmost type for easy error handling.
This makes easy to map
, and_then
etc. with fallible (Result
-returning)
functions over Option
and then call flip
to "surface" the Result
for error handling.
Type parameters
T
: The inner value typeE
: The error type ofResult