[][src]Enum dir_assert::Error

pub enum Error {
    Critical(String),
    ExtraExpected(PathBuf),
    ExtraActual(PathBuf),
    InvalidComparison {
        expected: PathBuf,
        actual: PathBuf,
    },
    FileContentsMismatch {
        expected: PathBuf,
        actual: PathBuf,
        line: usize,
    },
    MissingPath(PathBuf),
}

Variants

Critical(String)

Error with system IO, unrecoverable, ceasing traverse of current directory

ExtraExpected(PathBuf)

Extra expected item exists

ExtraActual(PathBuf)

Extra actual item exists

InvalidComparison

Found filename and directory sharing same name and path

Fields of InvalidComparison

expected: PathBufactual: PathBuf
FileContentsMismatch

Two files with same path have different contents

Fields of FileContentsMismatch

expected: PathBufactual: PathBufline: usize
MissingPath(PathBuf)

Top level directories are missing (eg. actual folder wasn't actually created)

Methods

impl Error[src]

pub fn new_critical<S: Into<String>>(message: S) -> Self[src]

pub fn new_extra_expected<P: Into<PathBuf>>(path: P) -> Self[src]

pub fn new_extra_actual<P: Into<PathBuf>>(path: P) -> Self[src]

pub fn new_invalid_comparison<PE: Into<PathBuf>, PA: Into<PathBuf>>(
    expected: PE,
    actual: PA
) -> Self
[src]

pub fn new_file_contents_mismatch<PE: Into<PathBuf>, PA: Into<PathBuf>>(
    expected: PE,
    actual: PA,
    line: usize
) -> Self
[src]

pub fn new_missing_path<P: Into<PathBuf>>(path: P) -> Self[src]

Trait Implementations

impl Clone for Error[src]

impl Debug for Error[src]

impl Display for Error[src]

Auto Trait Implementations

impl RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl UnwindSafe for Error

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> ToString for T where
    T: Display + ?Sized
[src]

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.