Skip to main content

MastNodeContext

Trait MastNodeContext 

Source
pub trait MastNodeContext {
    // Required methods
    fn node_count(&self) -> usize;
    fn get_node_by_id(&self, node_id: MastNodeId) -> Option<&MastNode>;
}
Expand description

Read-only node lookup used while building MAST nodes.

Required Methods§

Source

fn node_count(&self) -> usize

Returns the number of nodes available in this context.

Source

fn get_node_by_id(&self, node_id: MastNodeId) -> Option<&MastNode>

Returns a node by ID, if that ID is present in this context.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§