pub struct TreeEntry { /* private fields */ }Implementations§
Source§impl TreeEntry
impl TreeEntry
pub fn file( name: impl Into<String>, hash: ContentHash, executable: bool, ) -> Result<Self, TreeError>
pub fn directory( name: impl Into<String>, hash: ContentHash, ) -> Result<Self, TreeError>
pub fn symlink( name: impl Into<String>, hash: ContentHash, ) -> Result<Self, TreeError>
pub fn gitlink( name: impl Into<String>, target: GitObjectId, ) -> Result<Self, TreeError>
pub fn name(&self) -> &str
pub fn set_name(&mut self, name: impl Into<String>) -> Result<(), TreeError>
pub fn with_mode(&self, mode: FileMode) -> Result<Self, TreeError>
pub fn target(&self) -> &TreeEntryTarget
pub fn entry_type(&self) -> EntryType
pub fn mode(&self) -> FileMode
pub fn content_hash(&self) -> Option<ContentHash>
pub fn leaf_content_hash(&self) -> Option<ContentHash>
pub fn require_content_hash(&self) -> ContentHash
pub fn blob_hash(&self) -> Option<ContentHash>
pub fn tree_hash(&self) -> Option<ContentHash>
pub fn symlink_hash(&self) -> Option<ContentHash>
pub fn gitlink_target(&self) -> Option<GitObjectId>
pub fn is_tree(&self) -> bool
pub fn is_blob(&self) -> bool
pub fn is_symlink(&self) -> bool
pub fn is_gitlink(&self) -> bool
pub fn is_executable(&self) -> bool
Trait Implementations§
impl Eq for TreeEntry
impl StructuralPartialEq for TreeEntry
Auto Trait Implementations§
impl Freeze for TreeEntry
impl RefUnwindSafe for TreeEntry
impl Send for TreeEntry
impl Sync for TreeEntry
impl Unpin for TreeEntry
impl UnsafeUnpin for TreeEntry
impl UnwindSafe for TreeEntry
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