Struct rustreexo::accumulator::pollard::Node
source · pub struct Node { /* private fields */ }
Expand description
A forest node that can either be a leaf or a branch.
Implementations§
source§impl Node
impl Node
sourcepub fn write_one<W: Write>(&self, writer: &mut W) -> Result<()>
pub fn write_one<W: Write>(&self, writer: &mut W) -> Result<()>
Writes one node to the writer, this method will recursively write all children. The primary use of this method is to serialize the accumulator. In this case, you should call this method on each root in the forest.
sourcepub fn read_one<R: Read>(
reader: &mut R
) -> Result<(Rc<Node>, HashMap<NodeHash, Weak<Node>>)>
pub fn read_one<R: Read>( reader: &mut R ) -> Result<(Rc<Node>, HashMap<NodeHash, Weak<Node>>)>
Reads one node from the reader, this method will recursively read all children. The primary use of this method is to deserialize the accumulator. In this case, you should call this method on each root in the forest, assuming you know how many roots there are.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Node
impl !Send for Node
impl !Sync for Node
impl Unpin for Node
impl !UnwindSafe for Node
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