pub enum PackageError {
Io {
path: PathBuf,
source: Error,
},
NotAPackage {
path: PathBuf,
},
NoManifest {
path: PathBuf,
},
Json {
path: PathBuf,
file: String,
source: Error,
},
IndexedFileMissing {
path: PathBuf,
file: String,
},
}Expand description
Why a package could not be read.
Variants§
Io
A file or directory could not be read.
NotAPackage
The path is neither a .tgz file nor a directory.
NoManifest
The package holds no package/package.json.
Json
A JSON file of the package does not parse.
Fields
IndexedFileMissing
.index.json names a file the package does not hold.
Trait Implementations§
Source§impl Debug for PackageError
impl Debug for PackageError
Source§impl Display for PackageError
impl Display for PackageError
Source§impl Error for PackageError
impl Error for PackageError
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()
Source§impl From<PackageError> for LoadError
impl From<PackageError> for LoadError
Source§fn from(source: PackageError) -> Self
fn from(source: PackageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for PackageError
impl !UnwindSafe for PackageError
impl Freeze for PackageError
impl Send for PackageError
impl Sync for PackageError
impl Unpin for PackageError
impl UnsafeUnpin for PackageError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.