pub trait NodeReader {
type Error;
// Required methods
fn get_node(
&self,
alg_id: u64,
left: u64,
height: u32,
) -> impl Future<Output = ReadResult<Option<Vec<u8>>, Self>> + Send;
fn get_leaf(
&self,
index: u64,
) -> impl Future<Output = ReadResult<Vec<u8>, Self>> + Send;
}Expand description
A borrowed read substrate the single-algorithm engine folds over.
The engine reads stored node digests and (for flat logs) raw leaf payloads
through this trait; it never writes and never owns the store. The polydigest
combinator implements it over its one shared storage so N algorithm views
share a single data substrate (D14). The alg_id selects which algorithm’s
node namespace the read targets — leaf payloads are algorithm-agnostic and
stored once.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".