Skip to main content

SimpleProcessor

Struct SimpleProcessor 

Source
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>,

Source§

type Config = CFG

Source§

type ConsumeAttempt = CA

Source§

type ConsumeAttemptCreator = CAC

Source§

type Database = DB

Source§

type Input = <TR as TransformRequest>::Input

Source§

type Output = <TR as TransformRequest>::Output

Source§

type ProcessorError = ProcessorError

Source§

type TransformAttempt = TA

Source§

type TransformAttemptCreator = TAC

Source§

type TransformRequest = TR

Source§

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,

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>
where DB: Freeze, TAC: Freeze, CAC: Freeze,

§

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>
where DB: Send, TAC: Send, CAC: Send, TR: Send,

§

impl<CFG, TR, TA, TAC, CA, CAC, DB> Sync for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>
where DB: Sync, TAC: Sync, CAC: Sync, TR: Send,

§

impl<CFG, TR, TA, TAC, CA, CAC, DB> Unpin for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>
where DB: Unpin, TAC: Unpin, CAC: Unpin,

§

impl<CFG, TR, TA, TAC, CA, CAC, DB> UnsafeUnpin for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>
where DB: UnsafeUnpin, TAC: UnsafeUnpin, CAC: UnsafeUnpin,

§

impl<CFG, TR, TA, TAC, CA, CAC, DB> !UnwindSafe for SimpleProcessor<CFG, TR, TA, TAC, CA, CAC, DB>

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,