[−][src]Struct reference_trie::Recorder
Records trie nodes as they pass it.
Methods
impl<HO> Recorder<HO> where
HO: Copy,
[src]
impl<HO> Recorder<HO> where
HO: Copy,
pub fn new() -> Recorder<HO> | [src] |
Create a new Recorder
which records all given nodes.
pub fn with_depth(depth: u32) -> Recorder<HO> | [src] |
Create a Recorder
which only records nodes beyond a given depth.
pub fn record(&mut self, hash: &HO, data: &[u8], depth: u32) | [src] |
Record a visited node, given its hash, data, and depth.
pub fn drain(&mut self) -> Vec<Record<HO>> | [src] |
Drain all visited records.
Trait Implementations
impl<'a, H> Query<H> for &'a mut Recorder<<H as Hasher>::Out> where
H: Hasher,
[src]
impl<'a, H> Query<H> for &'a mut Recorder<<H as Hasher>::Out> where
H: Hasher,
type Item = ElasticArray128<u8>
Output item.
fn decode(self, value: &[u8]) -> ElasticArray128<u8> | [src] |
fn record(&mut self, hash: &<H as Hasher>::Out, data: &[u8], depth: u32) | [src] |
impl<HO> Default for Recorder<HO> where
HO: Copy,
[src]
impl<HO> Default for Recorder<HO> where
HO: Copy,
impl<HO> Debug for Recorder<HO> where
HO: Debug,
[src]
impl<HO> Debug for Recorder<HO> where
HO: Debug,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T> DebugIfStd for T where
T: Debug,
[src]
impl<T> DebugIfStd for T where
T: Debug,