#[repr(u32)]pub enum Durability {
Volatile = 0,
Transient = 1,
Persistent = 2,
}Expand description
Where the substrate stores bytes for the substrate’s contract with the durability knob.
Variants§
Volatile = 0
In-process anonymous memory; data evaporates on process exit.
Transient = 1
Cross-process RAM-resident shared memory; survives the producer’s exit if another holder keeps the named region alive, but is not on disk.
Persistent = 2
File-backed mmap; the bytes hit the page cache and can persist to disk via flush.
Implementations§
Source§impl Durability
impl Durability
Sourcepub fn recommended_locale(self) -> Locale
pub fn recommended_locale(self) -> Locale
Map a durability setting to the matching Locale member.
Trait Implementations§
Source§impl Clone for Durability
impl Clone for Durability
Source§fn clone(&self) -> Durability
fn clone(&self) -> Durability
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Durability
Source§impl Debug for Durability
impl Debug for Durability
impl Eq for Durability
Source§impl PartialEq for Durability
impl PartialEq for Durability
impl StructuralPartialEq for Durability
Auto Trait Implementations§
impl Freeze for Durability
impl RefUnwindSafe for Durability
impl Send for Durability
impl Sync for Durability
impl Unpin for Durability
impl UnsafeUnpin for Durability
impl UnwindSafe for Durability
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