pub struct TreeEntry<'a> {
pub name: &'a [u8],
pub mode: u32,
pub id: ObjectId,
}Expand description
One Git tree entry. Names are byte strings; filesystem-specific name limits and policies belong to the host. Modes retain Git’s original octal values.
Fields§
§name: &'a [u8]§mode: u32§id: ObjectIdImplementations§
Source§impl<'a> TreeEntry<'a>
impl<'a> TreeEntry<'a>
Sourcepub fn read(data: &'a [u8], offset: &mut usize) -> Result<Option<Self>>
pub fn read(data: &'a [u8], offset: &mut usize) -> Result<Option<Self>>
Read at a byte cursor, leaving it unchanged on error. This validates one entry’s mode, name and framing; use Tree::parse to check the whole order.
pub fn read_with_format( data: &'a [u8], offset: &mut usize, format: ObjectFormat, ) -> Result<Option<Self>>
Trait Implementations§
impl<'a> Copy for TreeEntry<'a>
impl<'a> Eq for TreeEntry<'a>
impl<'a> StructuralPartialEq for TreeEntry<'a>
Auto Trait Implementations§
impl<'a> Freeze for TreeEntry<'a>
impl<'a> RefUnwindSafe for TreeEntry<'a>
impl<'a> Send for TreeEntry<'a>
impl<'a> Sync for TreeEntry<'a>
impl<'a> Unpin for TreeEntry<'a>
impl<'a> UnsafeUnpin for TreeEntry<'a>
impl<'a> UnwindSafe for TreeEntry<'a>
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