pub struct SnapshotManager { /* private fields */ }Expand description
Snapshot manager
Implementations§
Source§impl SnapshotManager
impl SnapshotManager
Sourcepub fn new(config: SnapshotConfig) -> Result<Self>
pub fn new(config: SnapshotConfig) -> Result<Self>
Create a new snapshot manager
Sourcepub async fn create_snapshot<S: VectorStorage>(
&self,
storage: &S,
description: Option<String>,
) -> Result<SnapshotMetadata>
pub async fn create_snapshot<S: VectorStorage>( &self, storage: &S, description: Option<String>, ) -> Result<SnapshotMetadata>
Create a full snapshot from storage
Sourcepub async fn create_incremental_snapshot<S: VectorStorage>(
&self,
storage: &S,
parent_id: &str,
changed_namespaces: &[NamespaceId],
description: Option<String>,
) -> Result<SnapshotMetadata>
pub async fn create_incremental_snapshot<S: VectorStorage>( &self, storage: &S, parent_id: &str, changed_namespaces: &[NamespaceId], description: Option<String>, ) -> Result<SnapshotMetadata>
Create an incremental snapshot
Sourcepub async fn restore_snapshot<S: VectorStorage>(
&self,
storage: &S,
snapshot_id: &str,
) -> Result<RestoreResult>
pub async fn restore_snapshot<S: VectorStorage>( &self, storage: &S, snapshot_id: &str, ) -> Result<RestoreResult>
Restore from a snapshot
Sourcepub fn list_snapshots(&self) -> Result<Vec<SnapshotMetadata>>
pub fn list_snapshots(&self) -> Result<Vec<SnapshotMetadata>>
List all available snapshots
Sourcepub fn get_snapshot_metadata(
&self,
snapshot_id: &str,
) -> Result<SnapshotMetadata>
pub fn get_snapshot_metadata( &self, snapshot_id: &str, ) -> Result<SnapshotMetadata>
Get snapshot metadata
Sourcepub fn delete_snapshot(&self, snapshot_id: &str) -> Result<bool>
pub fn delete_snapshot(&self, snapshot_id: &str) -> Result<bool>
Delete a snapshot
Sourcepub fn snapshot_exists(&self, snapshot_id: &str) -> bool
pub fn snapshot_exists(&self, snapshot_id: &str) -> bool
Check if snapshot exists
Auto Trait Implementations§
impl Freeze for SnapshotManager
impl RefUnwindSafe for SnapshotManager
impl Send for SnapshotManager
impl Sync for SnapshotManager
impl Unpin for SnapshotManager
impl UnsafeUnpin for SnapshotManager
impl UnwindSafe for SnapshotManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more