pub struct SimpleProcessor<CFG: Config, TR, TA: TransformAttempt, TAC, CA: ConsumeAttempt, CAC, DB> { /* private fields */ }Trait Implementations§
Source§impl<CFG, TR, TA, TAC, CA, CAC, DB> Processor for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>where
CFG: Config<KeyType = String, ValueType = Vec<u8>> + Send + Sync + 'static,
TR: TransformRequest,
TA: TransformAttempt<TransformRequestIdentifier = TR::Identifier, CallArgsType = TR::Input, ReturnType = TR::Output>,
TAC: TransformAttemptCreator<TransformRequest = TR, TransformAttempt = TA, Input = TR::Input, Output = TR::Output>,
CA: ConsumeAttempt<TransformRequestIdentifier = TR::Identifier, TransformAttemptIdentifier = TA::Identifier, ConsumeVal = TR::Output>,
CAC: ConsumeAttemptCreator<TransformAttempt = TA, ConsumeAttempt = CA, Output = TR::Output>,
DB: Database<TransformRequest = TR, TransformAttempt = TA, ConsumeAttempt = CA, Input = TR::Input, Output = TR::Output>,
impl<CFG, TR, TA, TAC, CA, CAC, DB> Processor for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>where
CFG: Config<KeyType = String, ValueType = Vec<u8>> + Send + Sync + 'static,
TR: TransformRequest,
TA: TransformAttempt<TransformRequestIdentifier = TR::Identifier, CallArgsType = TR::Input, ReturnType = TR::Output>,
TAC: TransformAttemptCreator<TransformRequest = TR, TransformAttempt = TA, Input = TR::Input, Output = TR::Output>,
CA: ConsumeAttempt<TransformRequestIdentifier = TR::Identifier, TransformAttemptIdentifier = TA::Identifier, ConsumeVal = TR::Output>,
CAC: ConsumeAttemptCreator<TransformAttempt = TA, ConsumeAttempt = CA, Output = TR::Output>,
DB: Database<TransformRequest = TR, TransformAttempt = TA, ConsumeAttempt = CA, Input = TR::Input, Output = TR::Output>,
type Config = CFG
type ConsumeAttempt = CA
type ConsumeAttemptCreator = CAC
type Database = DB
type Input = <TR as TransformRequest>::Input
type Output = <TR as TransformRequest>::Output
type ProcessorError = ProcessorError
type TransformAttempt = TA
type TransformAttemptCreator = TAC
type TransformRequest = TR
fn new<'async_trait>(
init_config: Arc<Mutex<CFG>>,
database: Self::Database,
transform_attempt_creator: Self::TransformAttemptCreator,
consume_attempt_creator: Self::ConsumeAttemptCreator,
) -> Pin<Box<dyn Future<Output = (Self, ProcessorHandles<TR, TA, CA>)> + Send + 'async_trait>>where
Self: 'async_trait,
Source§fn processor_loop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn processor_loop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The main processing loop for the processor.
This is where the main processing logic would go
It would typically involve receiving
TransfomRequests from emitter,
processing them, halting the emitter when necessary,
and sending results to the consumer etc.Auto Trait Implementations§
impl<CFG, TR, TA, TAC, CA, CAC, DB> Freeze for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>
impl<CFG, TR, TA, TAC, CA, CAC, DB> !RefUnwindSafe for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>
impl<CFG, TR, TA, TAC, CA, CAC, DB> Send for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>
impl<CFG, TR, TA, TAC, CA, CAC, DB> Sync for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>
impl<CFG, TR, TA, TAC, CA, CAC, DB> Unpin for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>
impl<CFG, TR, TA, TAC, CA, CAC, DB> UnsafeUnpin for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>
impl<CFG, TR, TA, TAC, CA, CAC, DB> !UnwindSafe for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>
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