pub struct ExternalNode { /* private fields */ }Expand description
Node for referencing procedures not present in a given MastForest (hence “external”).
External nodes can be used to verify the integrity of a program’s hash while keeping parts of the program secret. They also allow a program to refer to a well-known procedure that was not compiled with the program (e.g. a procedure in the core library).
The hash of an external node is the hash of the procedure it represents, such that an external node can be swapped with the actual subtree that it represents without changing the MAST root.
Trait Implementations§
Source§impl Clone for ExternalNode
impl Clone for ExternalNode
Source§fn clone(&self) -> ExternalNode
fn clone(&self) -> ExternalNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExternalNode
impl Debug for ExternalNode
Source§impl From<ExternalNode> for MastNode
impl From<ExternalNode> for MastNode
Source§fn from(value: ExternalNode) -> Self
fn from(value: ExternalNode) -> Self
Source§impl MastNodeErrorContext for ExternalNode
impl MastNodeErrorContext for ExternalNode
Source§fn decorators<'a>(
&'a self,
forest: &'a MastForest,
) -> impl Iterator<Item = DecoratedOpLink> + 'a
fn decorators<'a>( &'a self, forest: &'a MastForest, ) -> impl Iterator<Item = DecoratedOpLink> + 'a
Source§fn get_assembly_op<'m>(
&self,
mast_forest: &'m MastForest,
target_op_idx: Option<usize>,
) -> Option<&'m AssemblyOp>
fn get_assembly_op<'m>( &self, mast_forest: &'m MastForest, target_op_idx: Option<usize>, ) -> Option<&'m AssemblyOp>
AssemblyOp associated with this node and operation (if provided), if any. Read moreSource§impl MastNodeExt for ExternalNode
impl MastNodeExt for ExternalNode
Source§fn digest(&self) -> Word
fn digest(&self) -> Word
Returns the commitment to the MAST node referenced by this external node.
The hash of an external node is the hash of the procedure it represents, such that an external node can be swapped with the actual subtree that it represents without changing the MAST root.
Source§fn before_enter<'a>(&'a self, forest: &'a MastForest) -> &'a [DecoratorId]
fn before_enter<'a>(&'a self, forest: &'a MastForest) -> &'a [DecoratorId]
Returns the decorators to be executed before this node is executed.
Source§fn after_exit<'a>(&'a self, forest: &'a MastForest) -> &'a [DecoratorId]
fn after_exit<'a>(&'a self, forest: &'a MastForest) -> &'a [DecoratorId]
Returns the decorators to be executed after this node is executed.