pub struct CacheTreeNode {
pub name: Vec<u8>,
pub entry_count: i32,
pub oid: Option<ObjectId>,
pub children: Vec<CacheTreeNode>,
}Expand description
One node from Git’s TREE index extension.
Fields§
§name: Vec<u8>Path component for this node. The root node stores an empty name.
entry_count: i32Number of index entries covered by this node, or -1 when invalid.
oid: Option<ObjectId>Tree object ID for valid nodes. Invalid nodes do not store an object ID.
children: Vec<CacheTreeNode>Immediate child cache-tree nodes.
Implementations§
Source§impl CacheTreeNode
impl CacheTreeNode
Sourcepub fn valid(
name: Vec<u8>,
entry_count: i32,
oid: ObjectId,
children: Vec<CacheTreeNode>,
) -> Self
pub fn valid( name: Vec<u8>, entry_count: i32, oid: ObjectId, children: Vec<CacheTreeNode>, ) -> Self
Create a valid cache-tree node.
Sourcepub fn invalidate(&mut self)
pub fn invalidate(&mut self)
Mark this node as invalid while preserving its children.
Trait Implementations§
Source§impl Clone for CacheTreeNode
impl Clone for CacheTreeNode
Source§fn clone(&self) -> CacheTreeNode
fn clone(&self) -> CacheTreeNode
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 moreSource§impl Debug for CacheTreeNode
impl Debug for CacheTreeNode
impl Eq for CacheTreeNode
Source§impl PartialEq for CacheTreeNode
impl PartialEq for CacheTreeNode
Source§fn eq(&self, other: &CacheTreeNode) -> bool
fn eq(&self, other: &CacheTreeNode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CacheTreeNode
Auto Trait Implementations§
impl Freeze for CacheTreeNode
impl RefUnwindSafe for CacheTreeNode
impl Send for CacheTreeNode
impl Sync for CacheTreeNode
impl Unpin for CacheTreeNode
impl UnsafeUnpin for CacheTreeNode
impl UnwindSafe for CacheTreeNode
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