[−][src]Enum git_checks_core::FileName
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) -> Result<Self, FileNameError> where
P: AsRef<str>,
[src]
P: AsRef<str>,
Parse a path from Git.
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 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]
impl Eq for FileName
[src]
impl PartialEq<FileName> for FileName
[src]
impl Display for FileName
[src]
impl Debug for FileName
[src]
impl StructuralEq for FileName
[src]
Auto Trait Implementations
impl Send for FileName
impl Sync for FileName
impl Unpin for FileName
impl UnwindSafe for FileName
impl RefUnwindSafe for FileName
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,