pub struct MapBind<S, T> { /* private fields */ }
Expand description
Arc is used to clone the inner type lazily. First the Arc gets cloned so the inner T can be reachable in an async move block (as opposed to reference captured in a normal async block, which makes them ?Send). Then, S is run and the inner T is cloned iff the result is ok.
Trait Implementations§
Auto Trait Implementations§
impl<S, T> Freeze for MapBind<S, T>where
S: Freeze,
impl<S, T> RefUnwindSafe for MapBind<S, T>where
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<S, T> Send for MapBind<S, T>
impl<S, T> Sync for MapBind<S, T>
impl<S, T> Unpin for MapBind<S, T>where
S: Unpin,
impl<S, T> UnwindSafe for MapBind<S, T>where
S: UnwindSafe,
T: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> PipeExt for Twhere
T: Pipe,
impl<T> PipeExt for Twhere
T: Pipe,
Source§fn tuple(self) -> Tuple<Self>
fn tuple(self) -> Tuple<Self>
Puts the
Output
in a tuple
such that it becomes part of the
TypeCons
and TupleApply
traits.Source§fn map_tuple(self) -> MapTuple<Self>
fn map_tuple(self) -> MapTuple<Self>
A combination of
map
and tuple
; if the result of the current
computation is Ok
then it gets put in a tuple.Source§fn aand_then<F, Fut, O>(self, f: F) -> AAndThen<Self, F, Fut>
fn aand_then<F, Fut, O>(self, f: F) -> AAndThen<Self, F, Fut>
Like
Result::and_then
, sequence an asynchronous computation that only
runs when the current commputation returns an Ok
Source§fn and_then<F, OOk>(
self,
f: F,
) -> AndThen<Self, F, Result<OOk, <Self::Output as ResultT>::Err>>
fn and_then<F, OOk>( self, f: F, ) -> AndThen<Self, F, Result<OOk, <Self::Output as ResultT>::Err>>
Like
Result::and_then
, sequence a synchronous computation that only
runs when the current commputation returns an Ok
Source§fn amap<F, Fut, O>(self, f: F) -> AMap<Self, F, Fut>
fn amap<F, Fut, O>(self, f: F) -> AMap<Self, F, Fut>
Like
Result::map
, sequence an asynchronous computation that only runs
when the current commputation returns an Ok
Source§fn map<F, O>(self, f: F) -> Map<Self, F, O>
fn map<F, O>(self, f: F) -> Map<Self, F, O>
Like
Result::map
, sequence a synchronous computation that only runs
when the current commputation returns an Ok
Source§fn aseqt<F, Fut, O>(self, f: F) -> Tuple<ASeq<Self, F, Fut>>
fn aseqt<F, Fut, O>(self, f: F) -> Tuple<ASeq<Self, F, Fut>>
A convenience function equivalent to calling
aseq
then tuple
Source§fn aseq<F, Fut, O>(self, f: F) -> ASeq<Self, F, Fut>
fn aseq<F, Fut, O>(self, f: F) -> ASeq<Self, F, Fut>
Sequence the current computation with an asynchronous one