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§

source

type TruncError: Error

Error that can occur during a truncation operation.

source

type Mark: Unsigned

Type to denote a truncation “mark”, after which the collection will be truncated.

Required Methods§

source

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”.

Implementors§

source§

impl AsyncTruncate for BufferedStorage

source§

impl AsyncTruncate for DmaStorage

source§

impl AsyncTruncate for InMemStorage

source§

impl AsyncTruncate for StdRandomReadFileStorage

source§

impl AsyncTruncate for StdSeekReadFileStorage

source§

impl<S, Idx> AsyncTruncate for Index<S, Idx>where S: Storage, Idx: Unsigned + CheckedSub + ToPrimitive + Ord + Copy,

§

type TruncError = IndexError<<S as Storage>::Error>

§

type Mark = Idx

source§

impl<S, M, H, Idx, SERP> AsyncTruncate for Segment<S, M, H, Idx, S::Size, SERP>where S: Storage, Idx: Unsigned + CheckedSub + ToPrimitive + Ord + Copy, SERP: SerializationProvider,

source§

impl<S, M, H, Idx, SERP, SSP, C> AsyncTruncate for SegmentedLog<S, M, H, Idx, S::Size, SERP, SSP, C>where S: Storage, S::Content: SplitAt<u8>, S::Size: Copy, SERP: SerializationProvider, H: Hasher + Default, Idx: Unsigned + CheckedSub + FromPrimitive + ToPrimitive + Ord + Copy + Serialize + DeserializeOwned, M: Default + Serialize + DeserializeOwned, SSP: SegmentStorageProvider<S, Idx>, C: Cache<usize, ()>, C::Error: Debug,

source§

impl<S: Storage, H> AsyncTruncate for Store<S, H>