[][src]Struct patch::File

pub struct File<'a> {
    pub path: Cow<'a, str>,
    pub meta: Option<FileMetadata<'a>>,
}

The file path and any additional info of either the old file or the new file

Fields

path: Cow<'a, str>

The parsed path or file name of the file

Avoids allocation if at all possible. Only allocates if the file path is a quoted string literal. String literals are necessary in some cases, for example if the file path has spaces in it. These literals can contain escaped characters which are initially seen as groups of two characters by the parser (e.g. '\' + 'n'). A newly allocated string is used to unescape those characters (e.g. "\n" -> '\n').

Note: While this string is typically a file path, this library makes no attempt to verify the format of that path. That means that this field can potentially be any string. You should verify it before doing anything that may be security-critical.

meta: Option<FileMetadata<'a>>

Any additional information provided with the file path

Trait Implementations

impl<'a> Eq for File<'a>[src]

impl<'a> Clone for File<'a>[src]

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

Performs copy-assignment from source. Read more

impl<'a> PartialEq<File<'a>> for File<'a>[src]

impl<'a> Debug for File<'a>[src]

impl<'a> Display for File<'a>[src]

Auto Trait Implementations

impl<'a> Send for File<'a>

impl<'a> Sync for File<'a>

Blanket Implementations

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> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[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]