Enum git_checks::FileName[][src]

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]

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.

The file name as a str.

The file name as a Path.

Important traits for &'a [u8]

The raw bytes of the file name.

Trait Implementations

impl Debug for FileName
[src]

Formats the value using the given formatter. Read more

impl Clone for FileName
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for FileName
[src]

impl Display for FileName
[src]

Formats the value using the given formatter. Read more

impl PartialEq for FileName
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl AsRef<str> for FileName
[src]

Performs the conversion.

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

Important traits for &'a [u8]

Performs the conversion.

impl AsRef<OsStr> for FileName
[src]

Performs the conversion.

impl AsRef<Path> for FileName
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for FileName

impl Sync for FileName