penumbra_tct::internal::interface

Trait Witness

Source
pub trait Witness: Height + Sized {
    // Required method
    fn witness(&self, index: impl Into<u64>) -> Option<(AuthPath<Self>, Hash)>;
}
Available on crate feature internal only.
Expand description

Witness an authentication path into a tree, or remove a witnessed item from one.

Required Methods§

Source

fn witness(&self, index: impl Into<u64>) -> Option<(AuthPath<Self>, Hash)>

Witness an authentication path to the given index in the tree.

The input mutable slice should be at least the height of the tree, and is overwritten by this function.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Witness for penumbra_tct::internal::complete::Item

Source§

impl Witness for penumbra_tct::internal::frontier::Item

Source§

impl<Child: Focus + Witness> Witness for penumbra_tct::internal::frontier::Node<Child>
where Child::Complete: Witness,

Source§

impl<Child: GetHash + Witness + Clone> Witness for penumbra_tct::internal::complete::Node<Child>

Source§

impl<Item: Focus + Witness + Clone> Witness for penumbra_tct::internal::frontier::Tier<Item>
where Item::Complete: Witness + Clone,

Source§

impl<Item: Focus + Witness + Clone> Witness for Top<Item>
where Item::Complete: Witness + Clone,

Source§

impl<Item: GetHash + Witness + Clone> Witness for penumbra_tct::internal::complete::Tier<Item>

Source§

impl<Item: Witness> Witness for penumbra_tct::internal::complete::Leaf<Item>

Source§

impl<Item: Witness> Witness for penumbra_tct::internal::frontier::Leaf<Item>