Enum sp_storage::StateVersion
source · [−]pub enum StateVersion {
V0,
V1,
}
Expand description
Different possible state version.
V0 and V1 uses a same trie implementation, but V1 will write external value node in the trie for
value with size at least TRIE_VALUE_NODE_THRESHOLD
.
Variants
V0
Old state version, no value nodes.
V1
New state version can use value nodes.
Implementations
sourceimpl StateVersion
impl StateVersion
sourcepub fn state_value_threshold(&self) -> Option<u32>
pub fn state_value_threshold(&self) -> Option<u32>
If defined, values in state of size bigger or equal to this threshold will use a separate trie node. Otherwhise, value will be inlined in branch or leaf node.
Trait Implementations
sourceimpl Clone for StateVersion
impl Clone for StateVersion
sourcefn clone(&self) -> StateVersion
fn clone(&self) -> StateVersion
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StateVersion
impl Debug for StateVersion
sourceimpl Default for StateVersion
impl Default for StateVersion
sourceimpl From<StateVersion> for u8
impl From<StateVersion> for u8
sourcefn from(version: StateVersion) -> u8
fn from(version: StateVersion) -> u8
Performs the conversion.
sourceimpl PartialEq<StateVersion> for StateVersion
impl PartialEq<StateVersion> for StateVersion
sourceimpl TryFrom<u8> for StateVersion
impl TryFrom<u8> for StateVersion
impl Copy for StateVersion
impl Eq for StateVersion
impl StructuralEq for StateVersion
impl StructuralPartialEq for StateVersion
Auto Trait Implementations
impl RefUnwindSafe for StateVersion
impl Send for StateVersion
impl Sync for StateVersion
impl Unpin for StateVersion
impl UnwindSafe for StateVersion
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more