pub enum ResultCallableKind {
Map,
MapErr,
AndThen,
}Expand description
Identifies map / map_err / and_then as the
callable-taking Result methods each engine handles inline.
Returns None for anything else so the caller can fall
through to result_method or the standard dispatcher.
Variants§
Map
r.map(f) — Ok(v) becomes Ok(f(v)), Err(e) passes.
MapErr
r.map_err(f) — Err(e) becomes Err(f(e)), Ok(v) passes.
AndThen
r.and_then(f) — Ok(v) becomes f(v) (expected to
return a Result), Err(e) passes.
Auto Trait Implementations§
impl Freeze for ResultCallableKind
impl RefUnwindSafe for ResultCallableKind
impl Send for ResultCallableKind
impl Sync for ResultCallableKind
impl Unpin for ResultCallableKind
impl UnsafeUnpin for ResultCallableKind
impl UnwindSafe for ResultCallableKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more