pub struct TreeWitnessReader<'a, T: Witness>(/* private fields */);

Implementations§

source§

impl<'a, T: Witness> TreeWitnessReader<'a, T>

source

pub fn new(witness: &'a T) -> Self

Trait Implementations§

source§

impl<'a, T: Debug + Witness> Debug for TreeWitnessReader<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: Witness> TreeReader for TreeWitnessReader<'a, T>

source§

fn get_node_option(&self, _node_key: &NodeKey) -> Result<Option<Node>>

Gets node given a node key. Returns None if the node does not exist.
source§

fn get_value_option( &self, _max_version: Version, _key_hash: KeyHash ) -> Result<Option<OwnedValue>>

Gets a value by identifier, returning the newest value whose version is less than or equal to the specified version. Returns None if the value does not exist.
source§

fn get_rightmost_leaf(&self) -> Result<Option<(NodeKey, LeafNode)>>

Gets the rightmost leaf. Note that this assumes we are in the process of restoring the tree and all nodes are at the same version.
source§

fn get_node(&self, node_key: &NodeKey) -> Result<Node, Error>

Gets node given a node key. Returns error if the node does not exist.
source§

fn get_value( &self, max_version: u64, key_hash: KeyHash ) -> Result<Vec<u8, Global>, Error>

Gets a value by identifier, returning the newest value whose version is less than or equal to the specified version. Returns an error if the value does not exist.

Auto Trait Implementations§

§

impl<'a, T> RefUnwindSafe for TreeWitnessReader<'a, T>where T: RefUnwindSafe,

§

impl<'a, T> Send for TreeWitnessReader<'a, T>where T: Sync,

§

impl<'a, T> Sync for TreeWitnessReader<'a, T>where T: Sync,

§

impl<'a, T> Unpin for TreeWitnessReader<'a, T>

§

impl<'a, T> UnwindSafe for TreeWitnessReader<'a, T>where T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more