pub struct BranchTree {
pub nodes: Vec<BranchNode>,
pub root: Option<usize>,
pub active_leaf: Option<usize>,
}Expand description
A navigable view of a session log as a branch tree.
Fields§
§nodes: Vec<BranchNode>Nodes, index-aligned with the entries slice passed to
project_branches.
root: Option<usize>Index of the root node, or None for an empty log.
active_leaf: Option<usize>Index of the active leaf — always the last log entry (pi semantics: the active branch is whichever one was appended to last).
Trait Implementations§
Source§impl Clone for BranchTree
impl Clone for BranchTree
Source§fn clone(&self) -> BranchTree
fn clone(&self) -> BranchTree
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BranchTree
impl RefUnwindSafe for BranchTree
impl Send for BranchTree
impl Sync for BranchTree
impl Unpin for BranchTree
impl UnsafeUnpin for BranchTree
impl UnwindSafe for BranchTree
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