Enum pages::git::GitFileMode
source · [−]#[repr(isize)]
pub enum GitFileMode {
Empty,
Regular,
Dir,
Deprecated,
Executable,
Symlink,
Submodule,
Unsupported,
}
Expand description
A FileMode represents the kind of tree entries used by git. It resembles regular file systems modes, although FileModes are considerably simpler (there are not so many), and there are some, like Submodule that has no file system equivalent.
Variants
Empty
Empty is used as the GitFileMode of tree elements when comparing trees in the following situations:
- the mode of tree elements before their creation.
- the mode of tree elements after their deletion.
- the mode of unmerged elements when checking the index.
Empty has no file system equivalent. As Empty is the zero value of GitFileMode
Regular
Regular represent non-executable files.
Dir
Dir represent a Directory.
Deprecated
Deprecated represent non-executable files with the group writable bit set. This mode was supported by the first versions of git, but it has been deprecated nowadays. This library(github.com/go-git/go-git uses it, not realaravinth/gitpad at the moment) uses them internally, so you can read old packfiles, but will treat them as Regulars when interfacing with the outside world. This is the standard git behaviour.
Executable
Executable represents executable files.
Symlink
Symlink represents symbolic links to files.
Submodule
Submodule represents git submodules. This mode has no file system equivalent.
Unsupported
Unsupported file mode
Trait Implementations
sourceimpl Clone for GitFileMode
impl Clone for GitFileMode
sourcefn clone(&self) -> GitFileMode
fn clone(&self) -> GitFileMode
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for GitFileMode
impl Debug for GitFileMode
sourceimpl From<&TreeEntry<'_>> for GitFileMode
impl From<&TreeEntry<'_>> for GitFileMode
sourceimpl From<TreeEntry<'_>> for GitFileMode
impl From<TreeEntry<'_>> for GitFileMode
sourceimpl From<isize> for GitFileMode
impl From<isize> for GitFileMode
sourceimpl FromPrimitive for GitFileMode
impl FromPrimitive for GitFileMode
type Primitive = isize
fn from_primitive(number: Self::Primitive) -> Self
sourceimpl PartialEq<GitFileMode> for GitFileMode
impl PartialEq<GitFileMode> for GitFileMode
sourcefn eq(&self, other: &GitFileMode) -> bool
fn eq(&self, other: &GitFileMode) -> bool
sourceimpl TryFromPrimitive for GitFileMode
impl TryFromPrimitive for GitFileMode
impl Eq for GitFileMode
impl StructuralEq for GitFileMode
impl StructuralPartialEq for GitFileMode
Auto Trait Implementations
impl RefUnwindSafe for GitFileMode
impl Send for GitFileMode
impl Sync for GitFileMode
impl Unpin for GitFileMode
impl UnwindSafe for GitFileMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.