Trait PersistentNode

Source
pub trait PersistentNode: Node {
    // Required methods
    fn left_child(&self) -> usize;
    fn right_child(&self) -> usize;
    fn set_children(&mut self, left: usize, right: usize);
}
Expand description

Required trait by nodes of persistent segment trees. It’s essentially a trait needed for the internals of the persistent segment trees, unless you have special requirements just use PersistentWrapper.

Required Methods§

Source

fn left_child(&self) -> usize

Gives index of left child.

Source

fn right_child(&self) -> usize

Gives index of right child.

Source

fn set_children(&mut self, left: usize, right: usize)

Sets saved index of both left and right children. (It’s assumed that before a call to this, the node has invalid indices.)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§