preset_env_base

Struct BrowserData

source
pub struct BrowserData<T: Default> {
Show 26 fields pub chrome: T, pub chrome_android: T, pub firerfox_android: T, pub opera_android: T, pub quest: T, pub react_native: T, pub and_chr: T, pub and_ff: T, pub op_mob: T, pub ie: T, pub edge: T, pub firefox: T, pub safari: T, pub node: T, pub ios: T, pub samsung: T, pub opera: T, pub android: T, pub electron: T, pub phantom: T, pub opera_mobile: T, pub rhino: T, pub deno: T, pub hermes: T, pub oculus: T, pub bun: T,
}
Expand description

A map without allocation.

Fields§

§chrome: T§chrome_android: T§firerfox_android: T§opera_android: T§quest: T§react_native: T§and_chr: T§and_ff: T§op_mob: T§ie: T§edge: T§firefox: T§safari: T§node: T§ios: T§samsung: T§opera: T§android: T§electron: T§phantom: T§opera_mobile: T§rhino: T§deno: T§hermes: T§oculus: T§bun: T

Implementations§

source§

impl<T: Default> BrowserData<T>

source

pub fn iter(&self) -> BrowserDataRefIter<'_, T>

source§

impl<T: Default> BrowserData<T>

source

pub fn iter_mut(&mut self) -> BrowserDataMutIter<'_, T>

source§

impl<T: Default> BrowserData<T>

source

pub fn map<N: Default>( self, op: impl FnMut(&'static str, T) -> N, ) -> BrowserData<N>

source

pub fn map_value<N: Default>(self, op: impl FnMut(T) -> N) -> BrowserData<N>

source§

impl<T> BrowserData<T>
where T: Default,

source

pub fn insert(&mut self, k: &str, v: T) -> T

source§

impl BrowserData<Option<Version>>

source

pub fn is_any_target(&self) -> bool

Returns true if all fields are None.

source

pub fn parse_versions(distribs: Vec<Distrib>) -> Result<Self, Error>

Parses the value returned from browserslist as Versions.

Trait Implementations§

source§

impl<T: Clone + Default> Clone for BrowserData<T>

source§

fn clone(&self) -> BrowserData<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Default> Debug for BrowserData<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Default + Default> Default for BrowserData<T>

source§

fn default() -> BrowserData<T>

Returns the “default value” for a type. Read more
source§

impl<'de, T> Deserialize<'de> for BrowserData<T>
where T: Deserialize<'de> + Default + Default,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<BrowserData<Option<Version>>> for Targets

source§

fn from(v: Versions) -> Self

Converts to this type from the input type.
source§

impl<'a, T: Default, K: ?Sized + Borrow<str>> Index<&'a K> for BrowserData<T>

source§

type Output = T

The returned type after indexing.
source§

fn index(&self, v: &K) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T: Default> IntoIterator for BrowserData<T>

source§

type IntoIter = IntoIter<(&'static str, T), 26>

Which kind of iterator are we turning this into?
source§

type Item = (&'static str, T)

The type of the elements being iterated over.
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<T: PartialEq + Default> PartialEq for BrowserData<T>

source§

fn eq(&self, other: &BrowserData<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T> Serialize for BrowserData<T>
where T: Serialize + Default,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<T: Copy + Default> Copy for BrowserData<T>

source§

impl<T: Eq + Default> Eq for BrowserData<T>

source§

impl<T: Default> StructuralPartialEq for BrowserData<T>

Auto Trait Implementations§

§

impl<T> Freeze for BrowserData<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for BrowserData<T>
where T: RefUnwindSafe,

§

impl<T> Send for BrowserData<T>
where T: Send,

§

impl<T> Sync for BrowserData<T>
where T: Sync,

§

impl<T> Unpin for BrowserData<T>
where T: Unpin,

§

impl<T> UnwindSafe for BrowserData<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,