pub struct MapOkWith<S, C, F>(/* private fields */);
Implementations§
Trait Implementations§
Source§impl<S, C, F> Collect for MapOkWith<S, C, F>
impl<S, C, F> Collect for MapOkWith<S, C, F>
Source§fn needs_trace() -> bool
fn needs_trace() -> bool
As an optimization, if this type can never hold a
Gc
pointer and trace
is unnecessary to
call, you may implement this method and return false. The default implementation returns
true, signaling that Collect::trace
must be called.Source§fn trace(&self, cc: CollectionContext<'_>)
fn trace(&self, cc: CollectionContext<'_>)
Must call
Collect::trace
on all held Gc
pointers. If this type holds inner types that
implement Collect
, a valid implementation would simply call Collect::trace
on all the
held values to ensure this.Auto Trait Implementations§
impl<S, C, F> Freeze for MapOkWith<S, C, F>
impl<S, C, F> RefUnwindSafe for MapOkWith<S, C, F>
impl<S, C, F> Send for MapOkWith<S, C, F>
impl<S, C, F> Sync for MapOkWith<S, C, F>
impl<S, C, F> Unpin for MapOkWith<S, C, F>
impl<S, C, F> UnwindSafe for MapOkWith<S, C, F>
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<'gc, T> SequenceExt<'gc> for Twhere
T: Sequence<'gc>,
impl<'gc, T> SequenceExt<'gc> for Twhere
T: Sequence<'gc>,
Source§fn map<F, R>(self, f: F) -> Map<Self, F>
fn map<F, R>(self, f: F) -> Map<Self, F>
Map a function over result of this sequence. Read more
Source§fn map_with<C, F, R>(self, c: C, f: F) -> MapWith<Self, C, F>
fn map_with<C, F, R>(self, c: C, f: F) -> MapWith<Self, C, F>
Equivalent to
SequencExt::map
but calls the function with a context parameter. Read moreSource§fn then<F, R>(self, f: F) -> Then<'gc, Self, F>
fn then<F, R>(self, f: F) -> Then<'gc, Self, F>
Execute a separate sequence step after this sequence completes. Read more
Source§fn then_with<C, F, R>(self, c: C, f: F) -> ThenWith<'gc, Self, C, F>
fn then_with<C, F, R>(self, c: C, f: F) -> ThenWith<'gc, Self, C, F>
Equivalent to
SequenceExt::then
but calls the function with the given context parameter. Read moreSource§fn chain<F, R>(self, f: F) -> Flatten<'gc, Then<'gc, Self, F>>
fn chain<F, R>(self, f: F) -> Flatten<'gc, Then<'gc, Self, F>>
Call a function on the result of this sequence, producing a new sequence to run. Read more
Source§fn chain_with<C, F, R>(
self,
c: C,
f: F,
) -> Flatten<'gc, ThenWith<'gc, Self, C, F>>
fn chain_with<C, F, R>( self, c: C, f: F, ) -> Flatten<'gc, ThenWith<'gc, Self, C, F>>
Equivalent to
SequenceExt::chain
but calls the function with the given context parameter. Read moreSource§impl<'gc, T, I, E> SequenceResultExt<'gc, I, E> for T
impl<'gc, T, I, E> SequenceResultExt<'gc, I, E> for T
Source§fn map_ok<F, R>(self, f: F) -> MapOk<Self, F>where
F: 'static + FnOnce(I) -> R,
fn map_ok<F, R>(self, f: F) -> MapOk<Self, F>where
F: 'static + FnOnce(I) -> R,
Map a function over the result of this sequence if it is successful. Read more
Source§fn map_ok_with<C, F, R>(self, c: C, f: F) -> MapOkWith<Self, C, F>where
F: 'static + FnOnce(C, I) -> R,
fn map_ok_with<C, F, R>(self, c: C, f: F) -> MapOkWith<Self, C, F>where
F: 'static + FnOnce(C, I) -> R,
Equivalent to
SequenceResultExt::map_ok
, but takes a context parameter.Source§fn map_err<F, R>(self, f: F) -> MapError<Self, F>where
F: 'static + FnOnce(E) -> R,
fn map_err<F, R>(self, f: F) -> MapError<Self, F>where
F: 'static + FnOnce(E) -> R,
Map a function over the error result of this sequence, if it errors. Read more
Source§fn and_then<F, R>(self, f: F) -> AndThen<Self, F, I>
fn and_then<F, R>(self, f: F) -> AndThen<Self, F, I>
Execute another sequence step after this sequence completes successfully. Read more
Source§fn and_then_with<C, F, R>(self, c: C, f: F) -> AndThenWith<Self, C, F, I>
fn and_then_with<C, F, R>(self, c: C, f: F) -> AndThenWith<Self, C, F, I>
Equivalent to
SequenceResultExt::and_then
, but calls the function with the given context
parameter.Source§fn and_chain<F, R, I2>(self, f: F) -> FlattenOk<AndThen<Self, F, I>, R>
fn and_chain<F, R, I2>(self, f: F) -> FlattenOk<AndThen<Self, F, I>, R>
Call a function on the result of this sequence, producing a new sequence to run. Read more
Source§fn and_chain_with<C, F, R, I2>(
self,
c: C,
f: F,
) -> FlattenOk<AndThenWith<Self, C, F, I>, R>
fn and_chain_with<C, F, R, I2>( self, c: C, f: F, ) -> FlattenOk<AndThenWith<Self, C, F, I>, R>
Equivalent to
SequenceResultExt::and_then
, but calls the function with the given context
parameter.