Skip to main content

WorkspaceError

Enum WorkspaceError 

Source
pub enum WorkspaceError {
    UnknownProject {
        name: String,
        known: String,
    },
    AmbiguousProject {
        known: String,
    },
    Empty,
    UnknownWorkspace {
        name: String,
        known: String,
    },
    AmbiguousWorkspace {
        known: String,
    },
    Discover {
        root: PathBuf,
        msg: String,
    },
    Unqualified {
        key: String,
    },
    NoGraph {
        name: String,
        path: PathBuf,
    },
    Prepare {
        name: String,
        msg: String,
    },
    Poisoned,
    Git(GitError),
    Store(StoreError),
}
Expand description

A failure resolving or opening a project’s graph.

Variants§

§

UnknownProject

A call named a project the workspace does not know.

Fields

§name: String

The requested name.

§known: String

Comma-separated list of known project names.

§

AmbiguousProject

A call omitted project but the workspace has no single default (it holds several projects), so the selection is ambiguous.

Fields

§known: String

Comma-separated list of known project names.

§

Empty

The workspace is registered but empty (no repos resolved).

§

UnknownWorkspace

A selector named a workspace the WorkspaceSet does not know.

Fields

§name: String

The requested workspace name.

§known: String

Comma-separated list of known workspace names.

§

AmbiguousWorkspace

A selection omitted a name but the WorkspaceSet holds several workspaces, so the choice is ambiguous.

Fields

§known: String

Comma-separated list of known workspace names.

§

Discover

Reading a workspace root directory during repo discovery failed.

Fields

§root: PathBuf

The root directory that could not be read.

§msg: String

The underlying I/O error message.

§

Unqualified

A cross-repo target was not a project-qualified key (<project>::<key>).

Fields

§key: String

The malformed key.

§

NoGraph

The project’s graph store does not exist yet — its repo has not been synced (roteiro sync).

Fields

§name: String

The project name.

§path: PathBuf

The repo directory whose graph is missing.

§

Prepare

The on-open hook (serve --sync-on-access) failed to prepare a project’s graph before it was first served.

Fields

§name: String

The project name.

§msg: String

The hook’s error message.

§

Poisoned

A store lock was poisoned by a panic in another thread.

§

Git(GitError)

Discovering the repo for a registered path failed.

§

Store(StoreError)

Opening the project’s store failed.

Trait Implementations§

Source§

impl Debug for WorkspaceError

Source§

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

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

impl Display for WorkspaceError

Source§

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

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

impl Error for WorkspaceError

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<GitError> for WorkspaceError

Source§

fn from(source: GitError) -> Self

Converts to this type from the input type.
Source§

impl From<StoreError> for WorkspaceError

Source§

fn from(source: StoreError) -> 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> ErrorExt for T
where T: Error + Send + Sync + 'static,

Source§

fn raise(self) -> Exn<Self>
where Self: Sized,

Raise this error as a new exception.
Source§

fn and_raise<T>(self, context: T) -> Exn<T>
where T: Error + Send + Sync + 'static, Self: Sized,

Raise this error as a child of a new exception with the given context error. Read more
Source§

fn raise_erased(self) -> Exn
where Self: Sized,

Raise this error as a new exception, with type erasure.
Source§

fn raise_all<T, I>(self, sources: I) -> Exn<Self>
where Self: Sized, T: Error + Send + Sync + 'static, I: IntoIterator, <I as IntoIterator>::Item: Into<Exn<T>>,

Raise this error as a new exception, with sources as causes.
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> 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 = 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.