Struct swc_ecma_preset_env::BrowserData[][src]

pub struct BrowserData<T: Default> {
    pub chrome: 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,
}

A map without allocation.

Fields

chrome: Tie: Tedge: Tfirefox: Tsafari: Tnode: Tios: Tsamsung: Topera: Tandroid: Telectron: Tphantom: Topera_mobile: T

Implementations

impl<T: Default> BrowserData<T>[src]

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

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

impl BrowserData<Option<Version>>[src]

pub fn is_any_target(&self) -> bool[src]

pub fn parse_versions<'a>(
    lines: impl Iterator<Item = &'a str>
) -> Result<Self, &'a str>
[src]

Trait Implementations

impl<T: Clone + Default> Clone for BrowserData<T>[src]

impl<T: Copy + Default> Copy for BrowserData<T>[src]

impl<T: Debug + Default> Debug for BrowserData<T>[src]

impl<T: Default> Default for BrowserData<T>[src]

impl<'de, T: Default> Deserialize<'de> for BrowserData<T> where
    T: Deserialize<'de>,
    T: Default
[src]

impl From<BrowserData<Option<Version>>> for Targets[src]

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

type Output = T

The returned type after indexing.

impl<T: Default> IntoIterator for BrowserData<T>[src]

type Item = (&'static str, T)

The type of the elements being iterated over.

type IntoIter = IntoIter<[(&'static str, T); 13]>

Which kind of iterator are we turning this into?

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Node for T where
    T: Any + ?Sized
[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.