pub enum Error {
Show 21 variants
Nom(String),
InvalidDate(String),
NotAtFirst(String),
BrowserNotFound(String),
UnknownElectronVersion(String),
UnknownNodejsVersion(String),
UnknownBrowserVersion(String, String),
UnsupportedCurrentNode,
UnsupportedExtends,
UnknownBrowserFeature(String),
UnknownRegion(String),
UnknownQuery(String),
DuplicatedSection(String),
FailedToReadConfig(String),
MissingFieldInPkg(String),
DuplicatedConfig(String, &'static str, &'static str),
FailedToAccessCurrentDir,
MissingEnv(String),
InvalidExtendName(&'static str),
FailedToResolveExtend(String),
YearOverflow,
}
Expand description
The errors may occur when querying with browserslist.
Variants§
Nom(String)
Error of parsing query.
InvalidDate(String)
Date format is invalid.
NotAtFirst(String)
Query can’t start with a negated query which starts with not
.
BrowserNotFound(String)
The given browser name can’t be found.
UnknownElectronVersion(String)
The given Electron version can’t be found.
UnknownNodejsVersion(String)
The given Node.js version can’t be found.
UnknownBrowserVersion(String, String)
The given version of the given browser can’t be found.
UnsupportedCurrentNode
Current environment doesn’t support querying current node
,
for example, running this library on Non-Node.js platform or
no Node.js installed.
UnsupportedExtends
Current environment doesn’t support querying extends
.
UnknownBrowserFeature(String)
Unknown browser feature.
UnknownRegion(String)
Unknown Can I Use region.
UnknownQuery(String)
Query can’t be recognized.
DuplicatedSection(String)
Duplicated section in configuration.
FailedToReadConfig(String)
Failed to read config.
MissingFieldInPkg(String)
Missing browserslist
field in package.json
file.
DuplicatedConfig(String, &'static str, &'static str)
Duplicated configuration found.
FailedToAccessCurrentDir
Failed to access the current working directory.
MissingEnv(String)
Missing config corresponding to specific environment.
InvalidExtendName(&'static str)
Invalid extend name
FailedToResolveExtend(String)
Failed to resolve package in extends
query.
YearOverflow
Year overflow.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
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>
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