pub enum ResolverError {
UnknownScheme {
scheme: String,
},
UnknownError,
FileNotFound {
relative: PathBuf,
from: PathBuf,
},
ModuleNotFound {
module: String,
},
ModuleEntryNotFound {
module: String,
entry_path: PathBuf,
package_path: PathBuf,
field: &'static str,
},
ModuleSubpathNotFound {
module: String,
path: PathBuf,
package_path: PathBuf,
},
JsonError(JsonError),
IOError(IOError),
PackageJsonError {
module: String,
path: PathBuf,
error: PackageJsonError,
},
PackageJsonNotFound {
from: PathBuf,
},
InvalidSpecifier(SpecifierError),
TsConfigExtendsNotFound {
tsconfig: PathBuf,
error: Box<ResolverError>,
},
}
Expand description
An error that occcured during resolution.
Variants§
UnknownScheme
An unknown URL scheme was found in the specifier.
UnknownError
An unknown error occurred.
FileNotFound
A file was not found.
ModuleNotFound
A node_modules directory was not found.
ModuleEntryNotFound
A package.json entry field pointed to a non-existent file.
Fields
ModuleSubpathNotFound
A sub-path could not be found within a node_modules package.
Fields
JsonError(JsonError)
An error parsing JSON.
IOError(IOError)
An I/O error.
PackageJsonError
A sub-path was not exported from a package.json.
Fields
§
error: PackageJsonError
Reason the path was not exported.
PackageJsonNotFound
A package.json file could not be found above the given path.
InvalidSpecifier(SpecifierError)
Could not parse the specifier.
TsConfigExtendsNotFound
Could not find an extended tsconfig.json file.
Fields
§
error: Box<ResolverError>
Original error resolving the tsconfig.json extends specifier.
Trait Implementations§
Source§impl Clone for ResolverError
impl Clone for ResolverError
Source§fn clone(&self) -> ResolverError
fn clone(&self) -> ResolverError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ResolverError
impl Debug for ResolverError
Source§impl Display for ResolverError
impl Display for ResolverError
Source§impl Error for ResolverError
impl Error for ResolverError
1.30.0 · 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<()> for ResolverError
impl From<()> for ResolverError
Source§impl From<Error> for ResolverError
impl From<Error> for ResolverError
Source§impl From<SpecifierError> for ResolverError
impl From<SpecifierError> for ResolverError
Source§fn from(value: SpecifierError) -> Self
fn from(value: SpecifierError) -> Self
Converts to this type from the input type.
Source§impl From<Utf8Error> for ResolverError
impl From<Utf8Error> for ResolverError
Source§impl PartialEq for ResolverError
impl PartialEq for ResolverError
Source§impl Serialize for ResolverError
impl Serialize for ResolverError
impl StructuralPartialEq for ResolverError
Auto Trait Implementations§
impl Freeze for ResolverError
impl !RefUnwindSafe for ResolverError
impl Send for ResolverError
impl Sync for ResolverError
impl Unpin for ResolverError
impl !UnwindSafe for ResolverError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more