Skip to main content

ProfileError

Enum ProfileError 

Source
#[non_exhaustive]
pub enum ProfileError {
Show 16 variants NotAProfile { location: String, profiles: Vec<String>, }, Incompatible { profile: String, requires: String, }, MissingPayload { profile: String, path: RelPath, }, Collision { path: RelPath, layers: Vec<String>, }, NotProvided { path: RelPath, from: String, layers: Vec<String>, }, FoldCollision { first: RelPath, second: RelPath, }, Cycle { chain: Vec<String>, }, TooDeep { chain: Vec<String>, }, Diverged { first: String, second: String, }, Escapes { profile: String, path: String, }, NoKeys { path: RelPath, }, NoComment { path: RelPath, }, Overlap { path: RelPath, key: String, first: String, second: String, }, Scopes { path: RelPath, layers: Vec<(String, Scope)>, }, SameName { name: String, first: String, second: String, }, Setting { key: String, first: String, second: String, },
}
Expand description

Why a profile, or the layers together, do not resolve.

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

NotAProfile

The source has no profile.toml.

Fields

§location: String

The source, as configured.

§profiles: Vec<String>

The directories that do hold one, as path would name them.

§

Incompatible

The profile’s devset requirement excludes this build.

Fields

§profile: String

The profile’s name.

§requires: String

Its requirement.

§

MissingPayload

[files] lists a path that files/ does not hold.

Fields

§profile: String

The profile’s name.

§path: RelPath

The listed path.

§

Collision

Several layers provide one path, and the target has not chosen.

Fields

§path: RelPath

The path.

§layers: Vec<String>

Every layer providing it.

§

NotProvided

An override’s from names a layer that does not provide the path.

Fields

§path: RelPath

The path.

§from: String

The layer named.

§layers: Vec<String>

The layers that do provide it.

§

FoldCollision

Two paths name one file on a case-insensitive filesystem.

Fields

§first: RelPath

The path met first.

§second: RelPath

The path that folds onto it.

§

Cycle

Requirements lead back to a profile already being expanded.

Fields

§chain: Vec<String>

Each source on the way round, the repeated one last.

§

TooDeep

Requirements nest deeper than devset follows.

Fields

§chain: Vec<String>

Each source on the way down.

§

Diverged

One profile is required at two refs, which would provide one set of files twice.

Fields

§first: String

The source met first.

§second: String

The source met second.

§

Escapes

A sibling requirement points outside the requiring profile’s source.

Fields

§profile: String

The requiring profile’s name.

§path: String

The requirement, as written.

§

NoKeys

Keys are owned in a file devset does not read as TOML, JSON or YAML.

Fields

§path: RelPath

The file.

§

NoComment

A block is owned in a file whose comment syntax devset does not know.

Fields

§path: RelPath

The file.

§

Overlap

Two layers own overlapping keys of one file.

Fields

§path: RelPath

The file.

§key: String

The key, as people write it.

§first: String

The layer met first.

§second: String

The layer that overlaps it.

§

Scopes

Layers own one file in different scopes: one whole and another in part, or one by keys and another by a block.

Fields

§path: RelPath

The file.

§layers: Vec<(String, Scope)>

Each layer, with its scope.

§

SameName

Two layers’ profiles have one name, which must tell layers apart.

Fields

§name: String

The name.

§first: String

The first layer’s source.

§second: String

The second layer’s source.

§

Setting

Two layers set one setting differently, and the target does not decide.

Fields

§key: String

The setting, as table.key.

§first: String

The layer that set it first.

§second: String

The layer that disagrees.

Trait Implementations§

Source§

impl Clone for ProfileError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProfileError

Source§

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

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

impl Display for ProfileError

Source§

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

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

impl Eq for ProfileError

Source§

impl Error for ProfileError

1.30.0 · 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<ProfileError> for Error

Source§

fn from(source: ProfileError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ProfileError

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ProfileError

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.