pub enum SnapshotSupport {
Enabled,
Disabled,
}Expand description
Declares whether a component supports snapshot persistence.
Components use this to declare their snapshot capability. The engine uses this to determine how to handle snapshot operations.
Variants§
Enabled
Component supports and requires snapshot persistence.
snapshot()will be called during session saverestore()will be called during session load- Restore failure is an error (not a warning)
Disabled
Component does not support snapshots (default).
snapshot()andrestore()will NOT be called- If called anyway, returns
SnapshotError::NotSupported
Trait Implementations§
Source§impl Clone for SnapshotSupport
impl Clone for SnapshotSupport
Source§fn clone(&self) -> SnapshotSupport
fn clone(&self) -> SnapshotSupport
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SnapshotSupport
impl Debug for SnapshotSupport
Source§impl Default for SnapshotSupport
impl Default for SnapshotSupport
Source§fn default() -> SnapshotSupport
fn default() -> SnapshotSupport
Returns the “default value” for a type. Read more
Source§impl PartialEq for SnapshotSupport
impl PartialEq for SnapshotSupport
impl Copy for SnapshotSupport
impl Eq for SnapshotSupport
impl StructuralPartialEq for SnapshotSupport
Auto Trait Implementations§
impl Freeze for SnapshotSupport
impl RefUnwindSafe for SnapshotSupport
impl Send for SnapshotSupport
impl Sync for SnapshotSupport
impl Unpin for SnapshotSupport
impl UnsafeUnpin for SnapshotSupport
impl UnwindSafe for SnapshotSupport
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