[][src]Enum git_checks::FileName

pub enum FileName {
    // some variants omitted
}

A representation of filenames as given by Git.

Git supports filenames with control characters and other non-Unicode byte sequence which are quoted when listed in certain Git command outputs. This enumeration smooths over these differences and offers accessors to the file name in different representations.

Generally, the as_ methods should be preferred to pattern matching on this enumeration.

Methods

impl FileName
[src]

pub fn new<P>(path: P) -> Self where
    P: AsRef<str>, 
[src]

Parse a path from Git.

Panics

Panics if non-ASCII paths are not formatted according to Git's ls-files formatting using core.quotePath=true.

pub fn as_str(&self) -> &str
[src]

The file name as a str.

pub fn as_path(&self) -> &Path
[src]

The file name as a Path.

pub fn as_bytes(&self) -> &[u8]
[src]

The raw bytes of the file name.

Trait Implementations

impl Eq for FileName
[src]

impl PartialEq<FileName> for FileName
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl AsRef<str> for FileName
[src]

impl AsRef<[u8]> for FileName
[src]

impl AsRef<OsStr> for FileName
[src]

impl AsRef<Path> for FileName
[src]

impl Clone for FileName
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for FileName
[src]

impl Display for FileName
[src]

Auto Trait Implementations

impl Send for FileName

impl Sync for FileName

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]