pub struct Forest<J: Jet> { /* private fields */ }
Implementations§
Source§impl<J: Jet> Forest<J>
impl<J: Jet> Forest<J>
Sourcepub fn from_program(root: Arc<CommitNode<J>>) -> Self
pub fn from_program(root: Arc<CommitNode<J>>) -> Self
Parses a program from a bytestring
Sourcepub fn roots(&self) -> &HashMap<Arc<str>, Arc<NamedCommitNode<J>>>
pub fn roots(&self) -> &HashMap<Arc<str>, Arc<NamedCommitNode<J>>>
Accessor for the map of roots of this forest
Sourcepub fn string_serialize(&self) -> String
pub fn string_serialize(&self) -> String
Serialize the program in human-readable form
Sourcepub fn to_witness_node(
&self,
witness: &HashMap<Arc<str>, Value>,
) -> Option<Arc<ConstructNode<J>>>
pub fn to_witness_node( &self, witness: &HashMap<Arc<str>, Value>, ) -> Option<Arc<ConstructNode<J>>>
Convert the forest into a witness node.
Succeeds if the forest contains a “main” root and returns None
otherwise.
Trait Implementations§
impl<J: Eq + Jet> Eq for Forest<J>
impl<J: Jet> StructuralPartialEq for Forest<J>
Auto Trait Implementations§
impl<J> Freeze for Forest<J>
impl<J> RefUnwindSafe for Forest<J>where
J: RefUnwindSafe,
impl<J> Send for Forest<J>
impl<J> Sync for Forest<J>
impl<J> Unpin for Forest<J>
impl<J> UnwindSafe for Forest<J>where
J: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more