Skip to main content

HolderError

Enum HolderError 

Source
pub(crate) enum HolderError {
    Parse {
        path: PathBuf,
        source: Error,
    },
    File(RequiredFileError),
    NotUtf8(NotUtf8),
    Changelog(ReadError),
    MissingUnreleased(MissingUnreleased),
    Malformed {
        path: PathBuf,
    },
    Document(DocumentTargetError),
    Path(PathError),
    Edit(EditError),
}
Expand description

Planning or application failure for a unit with a version holder.

Variants§

§

Parse

The version in the file is not strict semver.

Fields

§path: PathBuf

The version holder.

§source: Error

The parse failure.

§

File(RequiredFileError)

A version holder cannot be read.

§

NotUtf8(NotUtf8)

A version holder is not UTF-8 text.

§

Changelog(ReadError)

A changelog cannot be read.

§

MissingUnreleased(MissingUnreleased)

A changelog lacks the ## [Unreleased] heading.

§

Malformed

The file holds something other than one version line.

Fields

§path: PathBuf

The version file.

§

Document(DocumentTargetError)

A document cannot hold or take the version.

§

Path(PathError)

A configured path is unsafe or outside the repository.

§

Edit(EditError)

The planned edits conflict or are stale.

Trait Implementations§

Source§

impl Debug for HolderError

Source§

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

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

impl Display for HolderError

Source§

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

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

impl Error for HolderError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<DocumentTargetError> for HolderError

Source§

fn from(source: DocumentTargetError) -> Self

Converts to this type from the input type.
Source§

impl From<EditError> for HolderError

Source§

fn from(source: EditError) -> Self

Converts to this type from the input type.
Source§

impl From<HolderError> for ResolveError

Source§

fn from(source: HolderError) -> Self

Converts to this type from the input type.
Source§

impl From<MissingUnreleased> for HolderError

Source§

fn from(source: MissingUnreleased) -> Self

Converts to this type from the input type.
Source§

impl From<NotUtf8> for HolderError

Source§

fn from(source: NotUtf8) -> Self

Converts to this type from the input type.
Source§

impl From<PathError> for HolderError

Source§

fn from(source: PathError) -> Self

Converts to this type from the input type.
Source§

impl From<ReadError> for HolderError

Source§

fn from(source: ReadError) -> Self

Converts to this type from the input type.
Source§

impl From<RequiredFileError> for HolderError

Source§

fn from(source: RequiredFileError) -> Self

Converts to this type from the input type.

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

type Error = !

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>,

Source§

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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more