pub struct BoxedProcessor<I, O>(/* private fields */);Expand description
A processor of any concrete type, behind one dynamic dispatch.
Implementations§
Source§impl<I, O> BoxedProcessor<I, O>
impl<I, O> BoxedProcessor<I, O>
Sourcepub fn new<P: ItemProcessor<I, O> + 'static>(processor: P) -> Self
pub fn new<P: ItemProcessor<I, O> + 'static>(processor: P) -> Self
Erases a concrete processor.
Trait Implementations§
Source§impl<I, O> ItemProcessor<I, O> for BoxedProcessor<I, O>
impl<I, O> ItemProcessor<I, O> for BoxedProcessor<I, O>
Source§fn process<'a>(
&'a self,
item: &'a I,
context: ProcessContext<'a>,
) -> impl Future<Output = Result<ProcessOutcome<O>, ProcessorError>> + Send + 'a
fn process<'a>( &'a self, item: &'a I, context: ProcessContext<'a>, ) -> impl Future<Output = Result<ProcessOutcome<O>, ProcessorError>> + Send + 'a
Processes one borrowed item.
Auto Trait Implementations§
impl<I, O> !RefUnwindSafe for BoxedProcessor<I, O>
impl<I, O> !UnwindSafe for BoxedProcessor<I, O>
impl<I, O> Freeze for BoxedProcessor<I, O>
impl<I, O> Send for BoxedProcessor<I, O>
impl<I, O> Sync for BoxedProcessor<I, O>
impl<I, O> Unpin for BoxedProcessor<I, O>
impl<I, O> UnsafeUnpin for BoxedProcessor<I, O>where
Box<dyn ProcessorObject<I, O>>: UnsafeUnpin,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more