Trait laminarmq::storage::AsyncTruncate
source · pub trait AsyncTruncate {
type TruncError: Error;
type Mark: Unsigned;
// Required method
fn truncate<'life0, 'life1, 'async_trait>(
&'life0 mut self,
mark: &'life1 Self::Mark
) -> Pin<Box<dyn Future<Output = Result<(), Self::TruncError>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Trait representing a truncable collection of records, which can be truncated after a “mark”.
Required Associated Types§
sourcetype TruncError: Error
type TruncError: Error
Error that can occur during a truncation operation.
Required Methods§
sourcefn truncate<'life0, 'life1, 'async_trait>(
&'life0 mut self,
mark: &'life1 Self::Mark
) -> Pin<Box<dyn Future<Output = Result<(), Self::TruncError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn truncate<'life0, 'life1, 'async_trait>( &'life0 mut self, mark: &'life1 Self::Mark ) -> Pin<Box<dyn Future<Output = Result<(), Self::TruncError>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Truncates this collection after the given mark, such that this collection contains records only upto this “mark”.