pub trait MerkleTreeOverlay {
// Required methods
fn get_node(path: Vec<Path>) -> Result<Node, Error>;
fn height() -> u64;
fn min_repr_size() -> u64;
}
Expand description
Defines an interface for interacting with Proof
s via Path
s.
Required Methods§
Sourcefn get_node(path: Vec<Path>) -> Result<Node, Error>
fn get_node(path: Vec<Path>) -> Result<Node, Error>
Returns the Node
coresponding to the path
.
This will match path[0] against a field in the current object and recusively call itself on that field’s type with path[1..] until the path is exhausted.
See the SSZ specification to better understand the tree architecture:
https://github.com/ethereum/eth2.0-specs/blob/dev/specs/light_client/merkle_proofs.md
Returns the Node
coresponding to the given path
.
Sourcefn min_repr_size() -> u64
fn min_repr_size() -> u64
Returns the minimum number of bytes needed to represent the type’s value.
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.