pub enum ResolveError {
OutsideWorkspace {
path: PathBuf,
workspace: PathBuf,
},
FileNotFound(PathBuf),
CrateNotFound(PathBuf),
Io(Error),
AmbiguousCratePath {
path: String,
example_crate_path: String,
example_file_path: String,
example_crate_name: String,
},
}Expand description
WorkspacePathResolver error
Variants§
OutsideWorkspace
The requested path lives outside the active workspace root, so it cannot be resolved to a crate-relative location.
Fields
FileNotFound(PathBuf)
The requested file does not exist on disk.
CrateNotFound(PathBuf)
No crate in the workspace owns the requested path (e.g. the file is
inside the workspace root but not under any crate’s src/).
Io(Error)
Underlying I/O failure while walking the workspace.
AmbiguousCratePath
Ambiguous crate:: path in multi-crate workspace
In a workspace with multiple crates, crate::xxx is ambiguous because
it’s unclear which crate’s xxx is being referred to.
Trait Implementations§
Source§impl Debug for ResolveError
impl Debug for ResolveError
Source§impl Display for ResolveError
impl Display for ResolveError
Source§impl Error for ResolveError
impl Error for ResolveError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ResolveError
impl !RefUnwindSafe for ResolveError
impl Send for ResolveError
impl Sync for ResolveError
impl Unpin for ResolveError
impl UnsafeUnpin for ResolveError
impl !UnwindSafe for ResolveError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more