[][src]Enum coreutils_core::backup::BackupMode

pub enum BackupMode {
    None,
    Numbered,
    Existing,
    Simple,
}

Convenience Enum to represent the different backup modes. See module documentation for an in-depth overview of what each backup mode means/does.

Variants

None

No backups will be made.

Numbered

Backups will be made of the form <filename>~<X>~ where X is the next backup number.

Existing

The backup method will be consistant with what already exists for the current file.

Simple

Backups will be made of the form <filename><suffix> where suffix is any suffix.

Methods

impl BackupMode[src]

pub fn from_string(string: impl AsRef<str>) -> Self[src]

Creates an instance of BackupMode from a string slice. Any invalid input will result in BackupMode::Existing to be returned.

Trait Implementations

impl Clone for BackupMode[src]

impl Debug for BackupMode[src]

impl Eq for BackupMode[src]

impl<'_> From<&'_ str> for BackupMode[src]

fn from(string: &str) -> Self[src]

Creates an instance of BackupMode from a string slice. Any invalid input will result in BackupMode::Existing to be returned.

impl PartialEq<BackupMode> for BackupMode[src]

impl StructuralEq for BackupMode[src]

impl StructuralPartialEq for BackupMode[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.