Enum browserslist::Error[][src]

pub enum Error {
Show 18 variants ParseVersion(ParseFloatError), ParsePercentage(ParseFloatError), ParseVersionsCount(ParseIntError), ParseYearsCount(ParseFloatError), InvalidDate(String), BrowserNotFound(String), UnknownElectronVersion(String), UnknownNodejsVersion(String), UnknownBrowserVersion(StringString), UnsupportedCurrentNode, UnknownBrowserFeature(String), VersionRequired(String), UnknownQuery(String), DuplicatedSection(String), FailedToReadConfig(String), MissingFieldInPkg(String), DuplicatedConfig(String, &'static str, &'static str), FailedToAccessCurrentDir,
}
Expand description

The errors may occur when querying with browserslist.

Variants

ParseVersion(ParseFloatError)

Tuple Fields

Failed to parse version string.

ParsePercentage(ParseFloatError)

Tuple Fields

Failed to parse number as percentage value.

ParseVersionsCount(ParseIntError)

Tuple Fields

Failed to parse number as versions count.

ParseYearsCount(ParseFloatError)

Tuple Fields

Failed to parse number as years count.

InvalidDate(String)

Tuple Fields

0: String

Date format is invalid.

BrowserNotFound(String)

Tuple Fields

0: String

The given browser name can’t be found.

UnknownElectronVersion(String)

Tuple Fields

0: String

The given Electron version can’t be found.

UnknownNodejsVersion(String)

Tuple Fields

0: String

The given Node.js version can’t be found.

UnknownBrowserVersion(StringString)

Tuple Fields

0: String
1: 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)

Tuple Fields

0: String

Unknown browser feature.

VersionRequired(String)

Tuple Fields

0: String

Version string is missing when querying.

UnknownQuery(String)

Tuple Fields

0: String

Query can’t be recognized.

DuplicatedSection(String)

Tuple Fields

0: String

Duplicated section in configuration.

FailedToReadConfig(String)

Tuple Fields

0: String

Failed to read config.

MissingFieldInPkg(String)

Tuple Fields

0: String

Missing browserslist field in package.json file.

DuplicatedConfig(String, &'static str, &'static str)

Tuple Fields

0: String
1: &'static str
2: &'static str

Duplicated configuration found.

FailedToAccessCurrentDir

Failed to access the current working directory.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.