pub struct TreeShape {
pub counts: Vec<u8>,
}Fields§
§counts: Vec<u8>2026-09-25: counts[d-1] is the number of nodes at depth d; 1 means
the spine node only.
Implementations§
Source§impl TreeShape
impl TreeShape
pub fn parse(s: &str) -> Result<Self>
pub fn validate(&self) -> Result<()>
pub fn spine_len(&self) -> usize
Sourcepub fn nodes(&self) -> usize
pub fn nodes(&self) -> usize
2026-09-25: Total tree nodes (spine and hedges), excluding the root row.
Sourcepub fn verify_width(&self) -> usize
pub fn verify_width(&self) -> usize
2026-09-25: Verify width: the root row plus the nodes.
Trait Implementations§
impl Eq for TreeShape
impl StructuralPartialEq for TreeShape
Auto Trait Implementations§
impl Freeze for TreeShape
impl RefUnwindSafe for TreeShape
impl Send for TreeShape
impl Sync for TreeShape
impl Unpin for TreeShape
impl UnwindSafe for TreeShape
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.