Struct gix::parallel::reduce::IdentityWithResult
source · pub struct IdentityWithResult<Input, Error> { /* private fields */ }
Expand description
An identity reducer for those who want to use Stepwise
or in_parallel()
without the use of non-threaded reduction of products created in threads.
Trait Implementations§
source§impl<Input, Error> Default for IdentityWithResult<Input, Error>
impl<Input, Error> Default for IdentityWithResult<Input, Error>
source§fn default() -> IdentityWithResult<Input, Error>
fn default() -> IdentityWithResult<Input, Error>
Returns the “default value” for a type. Read more
source§impl<Input, Error> Reduce for IdentityWithResult<Input, Error>
impl<Input, Error> Reduce for IdentityWithResult<Input, Error>
§type FeedProduce = Input
type FeedProduce = Input
§type Output = ()
type Output = ()
The type produced once by the
finalize()
method. Read moresource§fn feed(
&mut self,
item: <IdentityWithResult<Input, Error> as Reduce>::Input
) -> Result<<IdentityWithResult<Input, Error> as Reduce>::FeedProduce, <IdentityWithResult<Input, Error> as Reduce>::Error>
fn feed( &mut self, item: <IdentityWithResult<Input, Error> as Reduce>::Input ) -> Result<<IdentityWithResult<Input, Error> as Reduce>::FeedProduce, <IdentityWithResult<Input, Error> as Reduce>::Error>
Called each time a new
item
was produced in order to aggregate it into the final result. Read moresource§fn finalize(
self
) -> Result<<IdentityWithResult<Input, Error> as Reduce>::Output, <IdentityWithResult<Input, Error> as Reduce>::Error>
fn finalize( self ) -> Result<<IdentityWithResult<Input, Error> as Reduce>::Output, <IdentityWithResult<Input, Error> as Reduce>::Error>
Called once once all items where passed to
feed()
, producing the final Output
of the operation or an Error
.Auto Trait Implementations§
impl<Input, Error> RefUnwindSafe for IdentityWithResult<Input, Error>where Error: RefUnwindSafe, Input: RefUnwindSafe,
impl<Input, Error> Send for IdentityWithResult<Input, Error>where Error: Send, Input: Send,
impl<Input, Error> Sync for IdentityWithResult<Input, Error>where Error: Sync, Input: Sync,
impl<Input, Error> Unpin for IdentityWithResult<Input, Error>where Error: Unpin, Input: Unpin,
impl<Input, Error> UnwindSafe for IdentityWithResult<Input, Error>where Error: UnwindSafe, Input: UnwindSafe,
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