Struct gix_object::tree::EntryMode
source · pub struct EntryMode(pub u16);
Expand description
The mode of items storable in a tree, similar to the file mode on a unix file system.
Used in mutable::Entry
and EntryRef
.
Note that even though it can be created from any u16
, it should be preferable to
create it by converting EntryKind
into EntryMode
.
Tuple Fields§
§0: u16
Implementations§
source§impl EntryMode
impl EntryMode
sourcepub const fn kind(&self) -> EntryKind
pub const fn kind(&self) -> EntryKind
Discretize the raw mode into an enum with well-known state while dropping unnecessary details.
sourcepub const fn is_commit(&self) -> bool
pub const fn is_commit(&self) -> bool
Return true if this entry mode represents the commit of a submodule.
sourcepub const fn is_no_tree(&self) -> bool
pub const fn is_no_tree(&self) -> bool
Return true if this entry mode represents anything BUT Tree/directory
sourcepub const fn is_executable(&self) -> bool
pub const fn is_executable(&self) -> bool
Return true if the entry is an executable blob.
sourcepub const fn is_blob_or_symlink(&self) -> bool
pub const fn is_blob_or_symlink(&self) -> bool
Return true if the entry is any kind of blob or symlink.
Methods from Deref<Target = u16>§
pub const MIN: u16 = 0u16
pub const MAX: u16 = 65_535u16
pub const BITS: u32 = 16u32
Trait Implementations§
source§impl<'de> Deserialize<'de> for EntryMode
impl<'de> Deserialize<'de> for EntryMode
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
source§impl Ord for EntryMode
impl Ord for EntryMode
source§impl PartialEq for EntryMode
impl PartialEq for EntryMode
source§impl PartialOrd for EntryMode
impl PartialOrd for EntryMode
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for EntryMode
impl Eq for EntryMode
impl StructuralPartialEq for EntryMode
Auto Trait Implementations§
impl Freeze for EntryMode
impl RefUnwindSafe for EntryMode
impl Send for EntryMode
impl Sync for EntryMode
impl Unpin for EntryMode
impl UnwindSafe for EntryMode
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)