pub struct BrowserData<T>where
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> BrowserData<T>where
T: Default,
impl<T> BrowserData<T>where
T: Default,
pub fn iter(&self) -> BrowserDataRefIter<'_, T>
Source§impl<T> BrowserData<T>where
T: Default,
impl<T> BrowserData<T>where
T: Default,
pub fn iter_mut(&mut self) -> BrowserDataMutIter<'_, T>
Source§impl<T> BrowserData<T>where
T: Default,
impl<T> BrowserData<T>where
T: Default,
Source§impl BrowserData<Option<Version>>
impl BrowserData<Option<Version>>
Sourcepub fn is_any_target(&self) -> bool
pub fn is_any_target(&self) -> bool
Returns true if all fields are None.
Sourcepub fn parse_versions(
distribs: Vec<Distrib>,
) -> Result<BrowserData<Option<Version>>, Error>
pub fn parse_versions( distribs: Vec<Distrib>, ) -> Result<BrowserData<Option<Version>>, Error>
Parses the value returned from browserslist
as Versions.
Trait Implementations§
Source§impl<T> Clone for BrowserData<T>
impl<T> Clone for BrowserData<T>
Source§fn clone(&self) -> BrowserData<T>
fn clone(&self) -> BrowserData<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Debug for BrowserData<T>
impl<T> Debug for BrowserData<T>
Source§impl<T> Default for BrowserData<T>where
T: Default,
impl<T> Default for BrowserData<T>where
T: Default,
Source§fn default() -> BrowserData<T>
fn default() -> BrowserData<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for BrowserData<T>where
T: Default + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for BrowserData<T>where
T: Default + Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BrowserData<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BrowserData<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a, T, K> Index<&'a K> for BrowserData<T>
impl<'a, T, K> Index<&'a K> for BrowserData<T>
Source§impl<T> IntoIterator for BrowserData<T>where
T: Default,
impl<T> IntoIterator for BrowserData<T>where
T: Default,
Source§impl<T> PartialEq for BrowserData<T>
impl<T> PartialEq for BrowserData<T>
Source§impl<T> Serialize for BrowserData<T>
impl<T> Serialize for BrowserData<T>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> Copy for BrowserData<T>
impl<T> Eq for BrowserData<T>
impl<T> StructuralPartialEq for BrowserData<T>where
T: Default,
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> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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