Skip to main content

TargetError

Enum TargetError 

Source
#[non_exhaustive]
pub enum TargetError {
Show 21 variants NotFound { dir: Utf8PathBuf, }, Nested { dir: Utf8PathBuf, root: Utf8PathBuf, }, OldConfig, NoSuchSource { name: SourceName, sources: Vec<SourceName>, layers: Vec<ProfileRef>, }, SourceExists { name: SourceName, location: String, }, NotGit { name: SourceName, }, WhichSource { profile: ProfileName, sources: Vec<SourceName>, }, Ambiguous { location: String, profiles: Vec<ProfileName>, }, DuplicateLayer { layer: ProfileName, }, LayerTwice { layer: ProfileName, }, NotListed { layer: ProfileName, feature: FeatureName, listed: Vec<FeatureName>, }, NoSuchLayer { name: String, names: Vec<String>, }, NoSuchScaffold { name: String, scaffolds: Vec<String>, }, Occupied { path: Utf8PathBuf, }, Unexplained { name: String, names: Vec<String>, }, NotManaged { path: String, managed: Vec<RelPath>, }, Required { name: ProfileName, by: ProfileName, }, StaleOverride { path: RelPath, provided: Vec<RelPath>, }, NotAFile { path: RelPath, kind: &'static str, }, Busy, Concurrent,
}
Expand description

Why a target cannot be found, read or written.

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

NotFound

No directory from here up holds .devset/config.toml.

Fields

§dir: Utf8PathBuf

Where the search began.

§

Nested

A new target would lie inside another.

Fields

§dir: Utf8PathBuf

The directory asked for.

§root: Utf8PathBuf

The enclosing target’s root.

§

OldConfig

config.toml is devset 0.1’s: its layers name locations, not profiles.

§

NoSuchSource

A layer, or a command, names a source [sources] does not.

Fields

§name: SourceName

The name asked for.

§sources: Vec<SourceName>

Every source’s name.

§layers: Vec<ProfileRef>

The layers config.toml names it for.

§

SourceExists

[sources] already names another source so.

Fields

§name: SourceName

The name.

§location: String

The source it names, as configured.

§

NotGit

A tag, branch or commit given for a source that is a directory.

Fields

§name: SourceName

The source.

§

WhichSource

A profile is named without its source, and the target names several, or none.

Fields

§profile: ProfileName

The profile.

§sources: Vec<SourceName>

Every source the target names.

§

Ambiguous

A source holds several profiles, and none was named.

Fields

§location: String

The source, as configured.

§profiles: Vec<ProfileName>

Every profile it holds.

§

DuplicateLayer

config.toml already lists the layer.

Fields

§layer: ProfileName

The layer’s profile.

§

LayerTwice

config.toml lists one layer twice, which a layer’s name must tell apart.

Fields

§layer: ProfileName

The layer’s profile.

§

NotListed

A feature to turn off that the layer does not list.

Fields

§layer: ProfileName

The layer’s profile.

§feature: FeatureName

The feature.

§listed: Vec<FeatureName>

The features the layer lists.

§

NoSuchLayer

No layer, and no source, has the name asked for.

Fields

§name: String

The name asked for.

§names: Vec<String>

Every layer’s name, and every source’s.

§

NoSuchScaffold

A scaffold named on the command line is no active profile’s.

Fields

§name: String

The name asked for, profile/group.

§scaffolds: Vec<String>

Every active profile’s scaffolds.

§

Occupied

A profile or a collection to author would be written over a file that is there.

Fields

§path: Utf8PathBuf

The file, as the command line names it.

§

Unexplained

A name explain was given that is neither a layer’s nor a managed file’s.

Fields

§name: String

The name, as given.

§names: Vec<String>

Every layer’s name, then every managed path.

§

NotManaged

A path named on the command line is not a file devset manages.

Fields

§path: String

The path, as given.

§managed: Vec<RelPath>

Every managed path.

§

Required

A layer named where only a configured one will do is one another profile requires.

Fields

§name: ProfileName

The layer asked for.

§by: ProfileName

The profile that requires it.

§

StaleOverride

config.toml overrides a path no layer provides.

Fields

§path: RelPath

The overridden path.

§provided: Vec<RelPath>

Every path the layers provide.

§

NotAFile

A managed path on disk is a symlink, a directory or a special file.

Fields

§path: RelPath

The managed path.

§kind: &'static str

What is there instead: a symlink, a directory or a special file.

§

Busy

Another devset holds the target’s lock.

§

Concurrent

state.toml changed while this devset ran.

Trait Implementations§

Source§

impl Clone for TargetError

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 TargetError

Source§

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

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

impl Display for TargetError

Source§

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

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

impl Eq for TargetError

Source§

impl Error for TargetError

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<TargetError> for Error

Source§

fn from(source: TargetError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for TargetError

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 TargetError

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