pub struct Branch {
pub name: String,
pub leaf: Option<NodeId>,
pub summary: Option<BranchSummary>,
pub created_at_ms: i64,
}Expand description
A named pointer into the tree: leaf is the node this branch currently
ends at (its “current-leaf pointer”, module 21’s phrase). None only for
a brand-new, still-empty tree’s implicit branch before any node exists.
Fields§
§name: StringThe branch’s name (unique within SessionTree::branches).
leaf: Option<NodeId>The node this branch currently points at (its leaf/current position).
summary: Option<BranchSummary>An attached summary (module 21 “branch summaries”), set by
SessionTree::summarize_branch/SessionTree::summarize_branch_with.
None — the overwhelmingly common case (a branch nobody has
summarized, e.g. the active one).
created_at_ms: i64Unix-ms wall-clock time this branch was created.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Branch
impl<'de> Deserialize<'de> for Branch
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Branch
impl RefUnwindSafe for Branch
impl Send for Branch
impl Sync for Branch
impl Unpin for Branch
impl UnsafeUnpin for Branch
impl UnwindSafe for Branch
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