Skip to main content

LoadErrorKind

Enum LoadErrorKind 

Source
#[non_exhaustive]
pub enum LoadErrorKind {
Show 22 variants GitIo { operation: &'static str, source: Error, }, Storage(StorageError), Locked { field: &'static str, message: String, source: Option<Box<TomlError>>, }, Graph(GraphError), Tree(Box<TreeError>), Budget { budget: Budget, limit: usize, }, Syntax { message: String, column: usize, }, Spawn(Error), Registry { first: String, }, Manifest { message: String, source: Option<Box<TomlError>>, }, Target(Box<TargetProblem>), DirSymlink, NoRoots, UnresolvedMod { module: String, }, BothModFiles { module: String, first: Box<RelPath>, second: Box<RelPath>, }, DuplicatePathAttr { module: String, }, ModuleCycle { module: String, again: Box<RelPath>, }, CfgParse { message: String, }, UnsupportedItem { what: String, }, UnresolvedTrait { path: String, }, Internal { what: String, }, SuperAboveRoot { path: String, },
}
Expand description

What went wrong while loading a file.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

GitIo

Native Git repository or object access failed.

Fields

§operation: &'static str

The host operation that failed.

§source: Error

The original operating-system failure.

§

Storage(StorageError)

Native storage refused a physical layout or allocation.

§

Locked

The locked package/edge profile is malformed, unsupported or ambiguous.

Fields

§field: &'static str

The field whose evidence was refused.

§message: String

What is wrong and how to correct it.

§source: Option<Box<TomlError>>

Native TOML cause for grammar and parser-resource failures.

§

Graph(GraphError)

A native graph operation refused invalid topology or physical storage.

§

Tree(Box<TreeError>)

The tree refused or failed the file.

§

Budget

The file exceeds a recursion budget of the pre-scan.

Fields

§budget: Budget

The budget that was exceeded.

§limit: usize

The most the budget allows.

§

Syntax

syn could not parse the file.

Fields

§message: String

The parser’s message.

§column: usize

The 1-based column of the error on its line.

§

Spawn(Error)

The thread that parses could not be started (the operating system refused the stack or the thread).

§

Registry

The parse worker’s native source registry was not fresh at entry, so its admitted storage bounds do not hold.

Fields

§first: String

The file name the registry gave the entry probe instead of the first.

§

Manifest

A Cargo.toml could not be read as a manifest.

Fields

§message: String

What is wrong with it.

§source: Option<Box<TomlError>>

Native TOML cause; schema errors have no parser failure.

§

Target(Box<TargetProblem>)

A target is wrong in a way the manifest keys explain.

A directory entry that discovery would have entered is a symlink.

§

NoRoots

The load was given no roots, so there is nothing to discover.

§

UnresolvedMod

A mod name; names no file.

Fields

§module: String

The module name, without a raw-identifier prefix.

§

BothModFiles

Both name.rs and name/mod.rs exist for a module.

Fields

§module: String

The module name, without a raw-identifier prefix.

§first: Box<RelPath>

The name.rs file.

§second: Box<RelPath>

The name/mod.rs file.

§

DuplicatePathAttr

A module has two path attributes that apply unconditionally.

Fields

§module: String

The module name, without a raw-identifier prefix.

§

ModuleCycle

A module leads back to a file that is still being followed.

Fields

§module: String

The module name, without a raw-identifier prefix.

§again: Box<RelPath>

The file that would be entered a second time.

§

CfgParse

A cfg, cfg_attr, path or test attribute could not be read: it has the wrong shape, its predicate cannot be read, or the value of a path is not a string literal.

Fields

§message: String

What is wrong with it.

§

UnsupportedItem

The file holds an item that the index does not model.

Fields

§what: String

A description of the item.

§

UnresolvedTrait

The trait of an impl block cannot be named by an absolute path.

Fields

§path: String

The trait path as written.

§

Internal

An invariant of the index does not hold. This is a bug in the crate, reported and not guessed around.

Fields

§what: String

What did not hold.

§

SuperAboveRoot

A path climbs above the crate root with super.

Fields

§path: String

The path as written.

Trait Implementations§

Source§

impl Debug for LoadErrorKind

Source§

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

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

impl Display for LoadErrorKind

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> EvidenceLease for T
where T: Debug + Send + Sync,

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

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.