pub enum FileMode {
Regular,
Executable,
Symlink,
}Expand description
The Git mode of a tracked file.
Variants§
Regular
A regular file without the executable bit.
Executable
A regular file with the executable bit.
Symlink
A symbolic link.
Implementations§
Source§impl FileMode
impl FileMode
const REGULAR_BITS: u32 = 0o100_644
const EXECUTABLE_BITS: u32 = 0o100_755
const SYMLINK_BITS: u32 = 0o120_000
const TYPE_MASK: u32 = 0o170_000
const OWNER_EXECUTE: u32 = 0o100
Sourcepub(crate) fn from_metadata(metadata: &Metadata) -> Self
pub(crate) fn from_metadata(metadata: &Metadata) -> Self
The mode of a file on disk, read without following symlinks.
Trait Implementations§
impl Copy for FileMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.