#[repr(u8)]pub enum FileMode {
Normal = 0,
Executable = 1,
Symlink = 2,
Gitlink = 3,
Spoollink = 4,
}Variants§
Normal = 0
Executable = 1
Symlink = 2
Gitlink = 3
Spoollink = 4
Native child-spool edge. This is NOT a git file mode: a spoollink
points at a spool-id + state-id, not a git object, so it has no valid
git submodule (160000) representation and Self::to_unix_mode
returns 0. Git-boundary code MUST handle it explicitly rather than
emit a bogus mode.
Implementations§
Source§impl FileMode
impl FileMode
pub fn to_byte(&self) -> u8
pub fn from_byte(b: u8) -> Option<Self>
Sourcepub fn to_unix_mode(&self) -> u32
pub fn to_unix_mode(&self) -> u32
The git tree/index mode for this entry. A spoollink has no git mode
(it is not a git object) and returns 0 — callers on a git boundary
must skip spoollinks rather than treat this as a real mode.
Trait Implementations§
impl Copy for FileMode
Source§impl<'de> Deserialize<'de> for FileMode
impl<'de> Deserialize<'de> for FileMode
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 FileMode
impl StructuralPartialEq for FileMode
Auto Trait Implementations§
impl Freeze for FileMode
impl RefUnwindSafe for FileMode
impl Send for FileMode
impl Sync for FileMode
impl Unpin for FileMode
impl UnsafeUnpin for FileMode
impl UnwindSafe for FileMode
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