pub struct QueueStore<T> { /* private fields */ }Expand description
A store that uses the filesystem to persist events in a queue
Implementations§
Source§impl<T: Serialize + DeserializeOwned + Send + Sync> QueueStore<T>
impl<T: Serialize + DeserializeOwned + Send + Sync> QueueStore<T>
Trait Implementations§
Source§impl<T> Clone for QueueStore<T>
impl<T> Clone for QueueStore<T>
Source§impl<T> FailedEventStore for QueueStore<T>
impl<T> FailedEventStore for QueueStore<T>
Source§fn put_failed_raw(
&self,
entry_name: &str,
data: &[u8],
) -> Result<String, StoreError>
fn put_failed_raw( &self, entry_name: &str, data: &[u8], ) -> Result<String, StoreError>
Writes pre-encoded bytes to the failed-events store under the given entry name and returns the
written entry id. Read more
Source§fn prune_failed_store(&self) -> Result<usize, StoreError>
fn prune_failed_store(&self) -> Result<usize, StoreError>
Removes failed-store entries older than the retention bound and returns how many were removed. Read more
Source§fn failed_len(&self) -> usize
fn failed_len(&self) -> usize
Returns the number of entries currently in the failed store.
Source§fn boxed_clone_failed(&self) -> Box<dyn FailedEventStore>
fn boxed_clone_failed(&self) -> Box<dyn FailedEventStore>
Clones the capability into an owned boxed handle sharing the same backing state, so the
maintenance scan can run inside a blocking task without borrowing the target.
Source§impl<T> Store<T> for QueueStore<T>
impl<T> Store<T> for QueueStore<T>
Source§type Error = StoreError
type Error = StoreError
The error type for the store
Source§fn put_multiple(&self, items: Vec<T>) -> Result<Self::Key, Self::Error>
fn put_multiple(&self, items: Vec<T>) -> Result<Self::Key, Self::Error>
Stores multiple items in a single batch
Source§fn put_raw(&self, data: &[u8]) -> Result<Self::Key, Self::Error>
fn put_raw(&self, data: &[u8]) -> Result<Self::Key, Self::Error>
Stores raw bytes in a single entry.
Source§fn get_multiple(&self, key: &Self::Key) -> Result<Vec<T>, Self::Error>
fn get_multiple(&self, key: &Self::Key) -> Result<Vec<T>, Self::Error>
Retrieves multiple items by key
Source§fn get_raw(&self, key: &Self::Key) -> Result<Vec<u8>, Self::Error>
fn get_raw(&self, key: &Self::Key) -> Result<Vec<u8>, Self::Error>
Retrieves the raw bytes stored for a key.
Auto Trait Implementations§
impl<T> Freeze for QueueStore<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for QueueStore<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for QueueStore<T>where
PhantomData<T>: Send,
impl<T> Sync for QueueStore<T>where
PhantomData<T>: Sync,
impl<T> Unpin for QueueStore<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for QueueStore<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for QueueStore<T>where
PhantomData<T>: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request