pub struct StateTree {
pub live: Keyspace,
pub tree: Keyspace,
}Fields§
§live: Keyspace§tree: KeyspaceImplementations§
Source§impl StateTree
impl StateTree
Sourcepub fn update(
&self,
changes: &LeafChanges,
batch: &mut OwnedWriteBatch,
) -> Result<[u8; 32], String>
pub fn update( &self, changes: &LeafChanges, batch: &mut OwnedWriteBatch, ) -> Result<[u8; 32], String>
Root after the changes; nodes and leaf hashes go into the batch.
Sourcepub fn update_levels(
&self,
changes: &LeafChanges,
batch: &mut OwnedWriteBatch,
full: bool,
) -> Result<([u8; 32], BTreeMap<u16, [u8; 32]>), String>
pub fn update_levels( &self, changes: &LeafChanges, batch: &mut OwnedWriteBatch, full: bool, ) -> Result<([u8; 32], BTreeMap<u16, [u8; 32]>), String>
Like update, plus the subtrees at LEVEL_DEPTH the changes touched,
or with full all LEVEL_SLOTS of them. A full set read from a tree
so sparse that a node above that depth collapsed into a leaf comes out
short, and the caller can tell by its length.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StateTree
impl !UnwindSafe for StateTree
impl Freeze for StateTree
impl Send for StateTree
impl Sync for StateTree
impl Unpin for StateTree
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].