pub enum Error {
Parse(String),
InvalidDate(String),
NotAtFirst(String),
BrowserNotFound(String),
UnknownElectronVersion(String),
UnknownNodejsVersion(String),
UnknownBrowserVersion(String, String),
UnsupportedCurrentNode,
UnknownBrowserFeature(String),
UnknownRegion(String),
UnknownQuery(String),
YearOverflow,
}Expand description
The errors may occur when querying with browserslist.
Variants§
Parse(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.
UnknownBrowserFeature(String)
Unknown browser feature.
UnknownRegion(String)
Unknown Can I Use region.
UnknownQuery(String)
Query can’t be recognized.
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)>
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()
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 UnsafeUnpin 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
Mutably borrows from an owned value. Read more