pub trait AmongOkExt<E, L, M, R> {
// Required methods
fn map_left<F, N>(self, l: F) -> Result<Among<N, M, R>, E>
where F: FnOnce(L) -> N;
fn map_middle<F, N>(self, m: F) -> Result<Among<L, N, R>, E>
where F: FnOnce(M) -> N;
fn map_right<F, N>(self, r: F) -> Result<Among<L, M, N>, E>
where F: FnOnce(R) -> N;
}Expand description
An extension trait for Result<Among<A, B, C>, _> that provides additional methods.
Required Methods§
sourcefn map_left<F, N>(self, l: F) -> Result<Among<N, M, R>, E>where
F: FnOnce(L) -> N,
fn map_left<F, N>(self, l: F) -> Result<Among<N, M, R>, E>where
F: FnOnce(L) -> N,
Apply the function f on the value in the Left variant if it is present rewrapping the
result in Left.
sourcefn map_middle<F, N>(self, m: F) -> Result<Among<L, N, R>, E>where
F: FnOnce(M) -> N,
fn map_middle<F, N>(self, m: F) -> Result<Among<L, N, R>, E>where
F: FnOnce(M) -> N,
Apply the function f on the value in the Middle variant if it is present rewrapping the
result in Middle.
Object Safety§
This trait is not object safe.