pub trait ManifestLogStorage {
type Error: ErrorExt + Send + Sync;
type Iter: LogIterator<Error = Self::Error>;
// Required methods
fn scan<'life0, 'async_trait>(
&'life0 self,
start: ManifestVersion,
end: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<Self::Iter, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_until<'life0, 'async_trait>(
&'life0 self,
end: ManifestVersion,
keep_last_checkpoint: bool,
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_all<'life0, 'async_trait>(
&'life0 self,
remove_action_version: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
version: ManifestVersion,
bytes: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
start: ManifestVersion,
end: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
version: ManifestVersion,
bytes: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_last_checkpoint<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<(ManifestVersion, Vec<u8>)>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_checkpoint<'life0, 'async_trait>(
&'life0 self,
version: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_checkpoint<'life0, 'async_trait>(
&'life0 self,
version: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<Option<(ManifestVersion, Vec<u8>)>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Associated Types§
Required Methods§
sourcefn scan<'life0, 'async_trait>(
&'life0 self,
start: ManifestVersion,
end: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<Self::Iter, 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::Iter, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Scan the logs in [start, end)
sourcefn delete_until<'life0, 'async_trait>(
&'life0 self,
end: ManifestVersion,
keep_last_checkpoint: bool,
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_until<'life0, 'async_trait>(
&'life0 self,
end: ManifestVersion,
keep_last_checkpoint: bool,
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete logs and checkpoints which version is less than specified end
.
Keep the last checkpoint and remaining logs if keep_last_checkpoint
is true.
Returns the delete logs number.
sourcefn delete_all<'life0, 'async_trait>(
&'life0 self,
remove_action_version: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_all<'life0, 'async_trait>(
&'life0 self,
remove_action_version: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete all logs and checkpoints, and remove the manifest directory.
The delta file corresponding to the remove_action_version
will be deleted along with the manifest directory at the end.
sourcefn save<'life0, 'life1, 'async_trait>(
&'life0 self,
version: ManifestVersion,
bytes: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
version: ManifestVersion,
bytes: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save a log
sourcefn delete<'life0, 'async_trait>(
&'life0 self,
start: ManifestVersion,
end: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
start: ManifestVersion,
end: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete logs in [start, end) and ignore checkpoints.
sourcefn save_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
version: ManifestVersion,
bytes: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
version: ManifestVersion,
bytes: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save a checkpoint.
sourcefn load_last_checkpoint<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<(ManifestVersion, Vec<u8>)>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_last_checkpoint<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<(ManifestVersion, Vec<u8>)>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load the latest checkpoint
sourcefn delete_checkpoint<'life0, 'async_trait>(
&'life0 self,
version: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_checkpoint<'life0, 'async_trait>(
&'life0 self,
version: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete the checkpoint by version
sourcefn load_checkpoint<'life0, 'async_trait>(
&'life0 self,
version: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<Option<(ManifestVersion, Vec<u8>)>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_checkpoint<'life0, 'async_trait>(
&'life0 self,
version: ManifestVersion,
) -> Pin<Box<dyn Future<Output = Result<Option<(ManifestVersion, Vec<u8>)>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load the checkpoint by version