pub struct SnapshotManager { /* private fields */ }Expand description
Snapshot manager
Implementations§
Source§impl SnapshotManager
impl SnapshotManager
Sourcepub fn new(config: SnapshotConfig) -> Self
pub fn new(config: SnapshotConfig) -> Self
Create new manager
Sourcepub async fn create_snapshot(
&mut self,
id: impl Into<String>,
buffers: Vec<(String, Vec<u8>, BufferType)>,
) -> Result<GpuSnapshot>
pub async fn create_snapshot( &mut self, id: impl Into<String>, buffers: Vec<(String, Vec<u8>, BufferType)>, ) -> Result<GpuSnapshot>
Create a snapshot
Sourcepub async fn restore_snapshot(
&mut self,
id: &str,
) -> Result<Vec<(String, Vec<u8>)>>
pub async fn restore_snapshot( &mut self, id: &str, ) -> Result<Vec<(String, Vec<u8>)>>
Restore a snapshot
Sourcepub fn list_snapshots(&self) -> Vec<&str>
pub fn list_snapshots(&self) -> Vec<&str>
List available snapshots
Sourcepub fn delete_snapshot(&mut self, id: &str) -> Result<()>
pub fn delete_snapshot(&mut self, id: &str) -> Result<()>
Delete snapshot
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SnapshotManager
impl RefUnwindSafe for SnapshotManager
impl Send for SnapshotManager
impl Sync for SnapshotManager
impl Unpin 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