ExecutorCallback

Struct ExecutorCallback 

Source
pub struct ExecutorCallback<E, C> { /* private fields */ }

Implementations§

Source§

impl<E, C> ExecutorCallback<E, C>

Source

pub fn new(executor: E, consumer: C) -> Self

Trait Implementations§

Source§

impl<'a, E, T1, C, I, R> IndexedProducerCallback<'a, I> for ExecutorCallback<E, C>
where E: Executor<'a, T1>, T1: Send + 'a, C: Consumer<I, Result = T1, Reducer = R> + 'a, R: Reducer<T1> + Send + 'a,

Source§

type Output = <E as Executor<'a, T1>>::Result

The type of value returned by this callback. Analogous to Output from the FnOnce trait.
Source§

fn callback<P>(self, producer: P) -> Self::Output
where P: IndexedProducer<Item = I> + 'a,

Invokes the callback with the given producer as argument. The key point of this trait is that this method is generic over P, and hence implementors must be defined for any producer.
Source§

impl<'a, E, T1, C, I, R> ProducerCallback<'a, I> for ExecutorCallback<E, C>
where E: Executor<'a, T1>, T1: Send + 'a, C: Consumer<I, Result = T1, Reducer = R> + 'a, R: Reducer<T1> + Send + 'a,

Source§

type Output = <E as Executor<'a, T1>>::Result

The type of value returned by this callback. Analogous to Output from the FnOnce trait.
Source§

fn callback<P>(self, producer: P) -> Self::Output
where P: Producer<Item = I> + 'a,

Invokes the callback with the given producer as argument. The key point of this trait is that this method is generic over P, and hence implementors must be defined for any producer.

Auto Trait Implementations§

§

impl<E, C> Freeze for ExecutorCallback<E, C>
where E: Freeze, C: Freeze,

§

impl<E, C> RefUnwindSafe for ExecutorCallback<E, C>

§

impl<E, C> Send for ExecutorCallback<E, C>
where E: Send, C: Send,

§

impl<E, C> Sync for ExecutorCallback<E, C>
where E: Sync, C: Sync,

§

impl<E, C> Unpin for ExecutorCallback<E, C>
where E: Unpin, C: Unpin,

§

impl<E, C> UnwindSafe for ExecutorCallback<E, C>
where E: UnwindSafe, C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.