store_api::manifest

Trait Manifest

source
pub trait Manifest:
    Send
    + Sync
    + Clone
    + 'static {
    type Error: ErrorExt + Send + Sync;
    type MetaAction: MetaAction;
    type MetaActionIterator: MetaActionIterator<Error = Self::Error, MetaAction = Self::MetaAction>;
    type Checkpoint: Checkpoint;

    // Required methods
    fn update<'life0, 'async_trait>(
        &'life0 self,
        action: Self::MetaAction,
    ) -> Pin<Box<dyn Future<Output = Result<ManifestVersion, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn scan<'life0, 'async_trait>(
        &'life0 self,
        start: ManifestVersion,
        end: ManifestVersion,
    ) -> Pin<Box<dyn Future<Output = Result<Self::MetaActionIterator, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn do_checkpoint<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Checkpoint>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn last_checkpoint<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Checkpoint>, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn last_version(&self) -> ManifestVersion;

    // Provided methods
    fn start<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn stop<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Manifest service

Required Associated Types§

Required Methods§

source

fn update<'life0, 'async_trait>( &'life0 self, action: Self::MetaAction, ) -> Pin<Box<dyn Future<Output = Result<ManifestVersion, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update metadata by the action

source

fn scan<'life0, 'async_trait>( &'life0 self, start: ManifestVersion, end: ManifestVersion, ) -> Pin<Box<dyn Future<Output = Result<Self::MetaActionIterator, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Scan actions which version in range [start, end)

source

fn do_checkpoint<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Checkpoint>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Do a checkpoint, it will create a checkpoint and compact actions.

source

fn last_checkpoint<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Checkpoint>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the last success checkpoint

source

fn last_version(&self) -> ManifestVersion

Returns the last(or latest) manifest version.

Provided Methods§

source

fn start<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Start the service

source

fn stop<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stop the service

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§