Struct browserslist::Distrib
source · [−]pub struct Distrib(_, _);
Expand description
Representation of browser name (or node
) and its version.
When converting it to string, it will be formatted as the output of browserslist. For example:
use browserslist::{Opts, resolve};
let distrib = &resolve(["firefox 93"], &Opts::new()).unwrap()[0];
assert_eq!(distrib.name(), "firefox");
assert_eq!(distrib.version(), "93");
Implementations
Return browser name, or node
.
use browserslist::{Opts, resolve};
let distrib = &resolve(["firefox 93"], &Opts::new()).unwrap()[0];
assert_eq!(distrib.name(), "firefox");
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'static>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'static>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Distrib
impl UnwindSafe for Distrib
Blanket Implementations
Mutably borrows from an owned value. Read more