Enum dotfiles_core::error::ErrorType

source ·
pub enum ErrorType {
    ExecutionError {
        popen_error: Option<PopenError>,
        exit_status: Option<ExitStatus>,
    },
    FileSystemError {
        fs_error: Error,
    },
    InconsistentConfigurationError,
    IncompleteConfigurationError {
        missing_field: String,
    },
    YamlParseError {
        scan_error: ScanError,
    },
    UnexpectedYamlTypeError {
        encountered: StrictYaml,
        expected: StrictYaml,
    },
    CoreError,
    TestingErrorActionSucceedsWhenItShouldFail,
}
Expand description

A collection of types of errors that may occur while parsing or executing actions

Variants§

§

ExecutionError

An error occurred while running a command necessary for executing an action

Fields

§popen_error: Option<PopenError>

If the command could not execute for some reason the underlying Popen Error will be saved here

§exit_status: Option<ExitStatus>

If the command attempted to execute but failed for some reason, the underlying ExitStatus will be saved here.

§

FileSystemError

A filesystem error that was encountered while either reading configuration or executing a filesystem related action

Fields

§fs_error: Error

The underlying filesystem error.

§

InconsistentConfigurationError

The configuration file is inconsistent with itself or with that dotfiles supports.

§

IncompleteConfigurationError

The configuration is missing a required field

Fields

§missing_field: String

Name of the field missing in the configuration

§

YamlParseError

An error that occurred while parsing the StrictYaml file

Fields

§scan_error: ScanError

The underlying scan error

§

UnexpectedYamlTypeError

Received an StrictYaml object of an unexpected type

Fields

§encountered: StrictYaml

What we got instead of the expected type.

§expected: StrictYaml

An example of what we expected.

§

CoreError

A core logic error for Dotfiles-rs

§

TestingErrorActionSucceedsWhenItShouldFail

An error only for testing, the action that should fail actually succeeds!

Trait Implementations§

source§

impl Debug for ErrorType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for ErrorType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.