pub enum StateTree {
Full(PatriciaTree),
Lazy(LazyTree),
}Expand description
状態の木の1本。全部のノードを持つか、必要なノードだけを持つか
Variants§
Full(PatriciaTree)
Lazy(LazyTree)
Implementations§
Source§impl StateTree
impl StateTree
pub fn set(&mut self, key: Hash256, value: Hash256)
pub fn remove(&mut self, key: &Hash256)
pub fn root(&mut self) -> Hash256
pub fn take_node_changes(&mut self) -> Vec<(Position, Option<TreeNode>)>
pub fn forget_node_changes(&mut self)
pub fn track_node_changes(&mut self, track: bool)
Sourcepub fn as_full(&self) -> Option<&PatriciaTree>
pub fn as_full(&self) -> Option<&PatriciaTree>
全部のノードを持つ木なら、その木。全部のノード、経路、葉の値は、全部を持つときだけ引ける
pub fn as_full_mut(&mut self) -> Option<&mut PatriciaTree>
pub fn as_lazy_mut(&mut self) -> Option<&mut LazyTree>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StateTree
impl RefUnwindSafe for StateTree
impl Send for StateTree
impl Sync for StateTree
impl Unpin for StateTree
impl UnsafeUnpin for StateTree
impl UnwindSafe for StateTree
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more