pub struct Tree { /* private fields */ }Implementations§
Source§impl Tree
impl Tree
pub fn new() -> Self
pub fn from_entries(entries: Vec<TreeEntry>) -> Self
pub fn validate(&self) -> Result<(), TreeError>
pub fn entries(&self) -> &[TreeEntry]
pub fn get(&self, name: &str) -> Option<&TreeEntry>
pub fn insert(&mut self, entry: TreeEntry)
pub fn remove(&mut self, name: &str) -> Option<TreeEntry>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn hash(&self) -> ContentHash
pub fn iter(&self) -> impl Iterator<Item = &TreeEntry>
pub fn get_path(&self, path: &Path) -> Option<&TreeEntry>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tree
impl<'de> Deserialize<'de> for Tree
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
impl Eq for Tree
Source§impl IntoIterator for Tree
impl IntoIterator for Tree
Source§impl<'a> IntoIterator for &'a Tree
impl<'a> IntoIterator for &'a Tree
impl StructuralPartialEq for Tree
Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnsafeUnpin for Tree
impl UnwindSafe for Tree
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