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§
type Error: ErrorExt + Send + Sync
type MetaAction: MetaAction
type MetaActionIterator: MetaActionIterator<Error = Self::Error, MetaAction = Self::MetaAction>
type Checkpoint: Checkpoint
Required Methods§
sourcefn 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 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
sourcefn 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 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)
sourcefn 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 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.
sourcefn 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_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
sourcefn last_version(&self) -> ManifestVersion
fn last_version(&self) -> ManifestVersion
Returns the last(or latest) manifest version.
Provided Methods§
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.