Struct distant_net::common::Backup
source · pub struct Backup { /* private fields */ }Expand description
Stores Frames for reuse later.
Implementations
sourceimpl Backup
impl Backup
sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clears the backup of any stored data and resets the state to being new.
Note
Like all other modifications, this will do nothing if the backup is frozen.
sourcepub fn is_frozen(&self) -> bool
pub fn is_frozen(&self) -> bool
Returns true if the backup is frozen, meaning that modifications will be ignored.
sourcepub fn set_frozen(&mut self, frozen: bool)
pub fn set_frozen(&mut self, frozen: bool)
Sets the frozen status.
sourcepub fn set_max_backup_size(&mut self, size: usize)
pub fn set_max_backup_size(&mut self, size: usize)
Sets the maximum size (in bytes) of collective frames stored in case a backup is needed
during reconnection. Setting the size to 0 will result in no frames being stored.
Note
Like all other modifications, this will do nothing if the backup is frozen.
sourcepub fn max_backup_size(&self) -> usize
pub fn max_backup_size(&self) -> usize
Returns the maximum size (in bytes) of collective frames stored in case a backup is needed during reconnection.
Trait Implementations
impl Eq for Backup
impl StructuralEq for Backup
impl StructuralPartialEq for Backup
Auto Trait Implementations
impl RefUnwindSafe for Backup
impl Send for Backup
impl Sync for Backup
impl Unpin for Backup
impl UnwindSafe for Backup
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more