Skip to main content

RustProjectError

Enum RustProjectError 

Source
pub enum RustProjectError {
    InvalidRoot {
        path: Box<str>,
        reason: Box<str>,
    },
    OutOfRoot {
        path: Box<str>,
        root: Box<str>,
    },
    NonUtf8Path {
        path: Box<str>,
    },
    ManifestRead {
        path: Box<str>,
        source: Error,
    },
    ManifestParse {
        path: Box<str>,
        message: Box<str>,
    },
    MissingPackageVersion {
        path: Box<str>,
    },
    MissingWorkspacePackageVersion {
        path: Box<str>,
        workspace: Box<str>,
    },
    InvalidPackageVersion {
        path: Box<str>,
        version: Box<str>,
        source: Error,
    },
    InvalidPackageEdition {
        path: Box<str>,
        edition: Box<str>,
    },
    MissingWorkspacePackageEdition {
        path: Box<str>,
        workspace: Box<str>,
    },
    LimitExceeded {
        limit: u32,
    },
    MemberScanLimitExceeded {
        limit: u32,
    },
}
Expand description

Failure encountered while reading a repository’s Cargo manifests.

Variants§

§

InvalidRoot

The supplied root is not a directory holding a readable Cargo.toml.

Fields

§path: Box<str>

The rejected root.

§reason: Box<str>

Why the root cannot anchor a project.

§

OutOfRoot

A path the loader reached is not inside the repository root.

Fields

§path: Box<str>

The path that cannot be made repository-relative.

§root: Box<str>

The root that does not contain it.

§

NonUtf8Path

A path beneath the repository root is not valid UTF-8.

Fields

§path: Box<str>

The offending path, rendered lossily for the message only.

§

ManifestRead

A manifest or a directory scanned for members could not be read.

Fields

§path: Box<str>

The unreadable path.

§source: Error

The underlying I/O failure.

§

ManifestParse

A manifest is not valid TOML, or does not match Cargo’s schema.

Fields

§path: Box<str>

The rejected manifest.

§message: Box<str>

The single-owner reason this manifest was rejected.

§

MissingPackageVersion

A package declares no version and inherits none.

Fields

§path: Box<str>

The manifest without a resolvable version.

§

MissingWorkspacePackageVersion

A package inherits its version from a workspace that declares none.

Fields

§path: Box<str>

The inheriting manifest.

§workspace: Box<str>

The workspace manifest that owes the value.

§

InvalidPackageVersion

A resolved package version is not valid SemVer.

Fields

§path: Box<str>

The manifest holding the rejected version.

§version: Box<str>

The exact rejected version text.

§source: Error

The underlying SemVer failure.

§

InvalidPackageEdition

A package declares an edition Cargo does not recognize.

Fields

§path: Box<str>

The manifest holding the rejected edition.

§edition: Box<str>

The exact rejected edition text.

§

MissingWorkspacePackageEdition

A package inherits its edition from a workspace that declares none.

Fields

§path: Box<str>

The inheriting manifest.

§workspace: Box<str>

The workspace manifest that owes the value.

§

LimitExceeded

The project holds more manifests than the configured limit allows.

Fields

§limit: u32

The configured manifest ceiling.

§

MemberScanLimitExceeded

Expanding the workspace member globs walked more of the tree than the configured limit allows.

Separate from Self::LimitExceeded because it is crossed before any manifest is read: the subject is directories visited, not manifests held, and the operator’s fix is a narrower members pattern rather than a higher manifest ceiling.

Fields

§limit: u32

The configured member-scan ceiling.

Trait Implementations§

Source§

impl Debug for RustProjectError

Source§

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

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

impl Display for RustProjectError

Source§

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

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

impl Error for RustProjectError

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

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, R> CollectAndApply<T, R> for T

Source§

fn collect_and_apply<I, F>(iter: I, f: F) -> R
where I: Iterator<Item = T>, F: FnOnce(&[T]) -> R,

Equivalent to f(&iter.collect::<Vec<_>>()).

Source§

type Output = R

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<T> IntoBox<dyn Any + Send> for T
where T: Any + Send,

Source§

fn into_box(self) -> Box<dyn Any + Send>

Convert self into the appropriate boxed form.
Source§

impl<T> IntoBox<dyn Any + Sync + Send> for T
where T: Any + Send + Sync,

Source§

fn into_box(self) -> Box<dyn Any + Sync + Send>

Convert self into the appropriate boxed form.
Source§

impl<T> IntoBox<dyn Any> for T
where T: Any,

Source§

fn into_box(self) -> Box<dyn Any>

Convert self into the appropriate boxed form.
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> Lookup<T> for T

Source§

fn into_owned(self) -> T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

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

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

impl<I, T, U> Upcast<I, U> for T
where U: UpcastFrom<I, T>,

Source§

fn upcast(self, interner: I) -> U

Source§

impl<I, T> UpcastFrom<I, T> for T

Source§

fn upcast_from(from: T, _tcx: I) -> T

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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