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
Trait Implementations
sourceimpl Deserialize<'static> for Distrib
impl Deserialize<'static> for Distrib
sourcefn 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
sourceimpl PartialEq<Distrib> for Distrib
impl PartialEq<Distrib> for Distrib
impl Eq for Distrib
impl StructuralEq for Distrib
impl StructuralPartialEq for Distrib
Auto Trait Implementations
impl RefUnwindSafe for Distrib
impl Send for Distrib
impl Sync for Distrib
impl Unpin for Distrib
impl UnwindSafe for Distrib
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more