pub struct InMemoryDatabase<TR, TA, CA, C>where
TR: TransformRequest + Send + Sync,
TA: TransformAttempt<TransformRequestIdentifier = TR::Identifier, CallArgsType = TR::Input, ReturnType = TR::Output> + Send + Sync,
CA: ConsumeAttempt<TransformRequestIdentifier = TR::Identifier, TransformAttemptIdentifier = TA::Identifier, ConsumeVal = TR::Output> + Send + Sync,
C: Config,{ /* private fields */ }Trait Implementations§
Source§impl<TR, TA, CA, C> Database for InMemoryDatabase<TR, TA, CA, C>where
TR: TransformRequest + Send + Sync,
TA: TransformAttempt<TransformRequestIdentifier = TR::Identifier, CallArgsType = TR::Input, ReturnType = TR::Output> + Send + Sync,
CA: ConsumeAttempt<TransformRequestIdentifier = TR::Identifier, TransformAttemptIdentifier = TA::Identifier, ConsumeVal = TR::Output> + Send + Sync,
C: Config<KeyType = String, ValueType = Vec<u8>>,
TR::Identifier: Hash,
impl<TR, TA, CA, C> Database for InMemoryDatabase<TR, TA, CA, C>where
TR: TransformRequest + Send + Sync,
TA: TransformAttempt<TransformRequestIdentifier = TR::Identifier, CallArgsType = TR::Input, ReturnType = TR::Output> + Send + Sync,
CA: ConsumeAttempt<TransformRequestIdentifier = TR::Identifier, TransformAttemptIdentifier = TA::Identifier, ConsumeVal = TR::Output> + Send + Sync,
C: Config<KeyType = String, ValueType = Vec<u8>>,
TR::Identifier: Hash,
type Config = C
type ConsumeAttempt = CA
type DatabaseError = InMemoryDatabaseError
type Input = <TR as TransformRequest>::Input
type Output = <TR as TransformRequest>::Output
type TransformAttempt = TA
type TransformRequest = TR
fn new<'async_trait>(
_ctx: Arc<Mutex<Self::Config>>,
) -> Pin<Box<dyn Future<Output = Result<Self, Self::DatabaseError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
fn get_dyn_configs<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(<Self::Config as Config>::KeyType, <Self::Config as Config>::ValueType)>, Self::DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_transform_request<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: &'life1 Self::TransformRequest,
) -> Pin<Box<dyn Future<Output = Result<(), Self::DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_transform_attempt<'life0, 'life1, 'async_trait>(
&'life0 mut self,
attempt: &'life1 Self::TransformAttempt,
) -> Pin<Box<dyn Future<Output = Result<(), Self::DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_transform_attempt<'life0, 'life1, 'async_trait>(
&'life0 mut self,
attempt: &'life1 WorkerManagerResult<Self::TransformAttempt>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_consume_attempt<'life0, 'life1, 'async_trait>(
&'life0 mut self,
attempt: &'life1 Self::ConsumeAttempt,
) -> Pin<Box<dyn Future<Output = Result<(), Self::DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_consume_attempt<'life0, 'async_trait>(
&'life0 mut self,
attempt: ConsumeAttemptResult<Self::ConsumeAttempt>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn archive_request_with_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
request: &'life1 <Self::TransformRequest as TransformRequest>::Identifier,
) -> Pin<Box<dyn Future<Output = Result<(), Self::DatabaseError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl<TR, TA, CA, C> Debug for InMemoryDatabase<TR, TA, CA, C>where
TR: TransformRequest + Send + Sync + Debug,
TA: TransformAttempt<TransformRequestIdentifier = TR::Identifier, CallArgsType = TR::Input, ReturnType = TR::Output> + Send + Sync + Debug,
CA: ConsumeAttempt<TransformRequestIdentifier = TR::Identifier, TransformAttemptIdentifier = TA::Identifier, ConsumeVal = TR::Output> + Send + Sync + Debug,
C: Config + Debug,
TR::Identifier: Debug,
TA::Identifier: Debug,
CA::Identifier: Debug,
impl<TR, TA, CA, C> Debug for InMemoryDatabase<TR, TA, CA, C>where
TR: TransformRequest + Send + Sync + Debug,
TA: TransformAttempt<TransformRequestIdentifier = TR::Identifier, CallArgsType = TR::Input, ReturnType = TR::Output> + Send + Sync + Debug,
CA: ConsumeAttempt<TransformRequestIdentifier = TR::Identifier, TransformAttemptIdentifier = TA::Identifier, ConsumeVal = TR::Output> + Send + Sync + Debug,
C: Config + Debug,
TR::Identifier: Debug,
TA::Identifier: Debug,
CA::Identifier: Debug,
Auto Trait Implementations§
impl<TR, TA, CA, C> Freeze for InMemoryDatabase<TR, TA, CA, C>
impl<TR, TA, CA, C> RefUnwindSafe for InMemoryDatabase<TR, TA, CA, C>where
C: RefUnwindSafe,
<TR as TransformRequest>::Identifier: RefUnwindSafe,
TR: RefUnwindSafe,
<TA as TransformAttempt>::Identifier: RefUnwindSafe,
TA: RefUnwindSafe,
<CA as ConsumeAttempt>::Identifier: RefUnwindSafe,
CA: RefUnwindSafe,
impl<TR, TA, CA, C> Send for InMemoryDatabase<TR, TA, CA, C>
impl<TR, TA, CA, C> Sync for InMemoryDatabase<TR, TA, CA, C>
impl<TR, TA, CA, C> Unpin for InMemoryDatabase<TR, TA, CA, C>where
C: Unpin,
<TR as TransformRequest>::Identifier: Unpin,
TR: Unpin,
<TA as TransformAttempt>::Identifier: Unpin,
TA: Unpin,
<CA as ConsumeAttempt>::Identifier: Unpin,
CA: Unpin,
impl<TR, TA, CA, C> UnsafeUnpin for InMemoryDatabase<TR, TA, CA, C>
impl<TR, TA, CA, C> UnwindSafe for InMemoryDatabase<TR, TA, CA, C>where
<TR as TransformRequest>::Identifier: UnwindSafe,
TR: UnwindSafe,
C: UnwindSafe,
<TA as TransformAttempt>::Identifier: UnwindSafe,
TA: UnwindSafe,
<CA as ConsumeAttempt>::Identifier: UnwindSafe,
CA: 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
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