pub enum CustomMediaQueryMediaType {
Ident(Ident),
MediaQueryList(MediaQueryList),
}
Variants§
Ident(Ident)
MediaQueryList(MediaQueryList)
Implementations§
source§impl CustomMediaQueryMediaType
impl CustomMediaQueryMediaType
sourcepub fn as_ident(&self) -> Option<&Ident>
pub fn as_ident(&self) -> Option<&Ident>
Returns Some
if self
is a reference of variant Ident
, and None
otherwise.
sourcepub fn as_mut_ident(&mut self) -> Option<&mut Ident>
pub fn as_mut_ident(&mut self) -> Option<&mut Ident>
Returns Some
if self
is a mutable reference of variant Ident
, and None
otherwise.
sourcepub fn expect_ident(self) -> Identwhere
Self: Debug,
pub fn expect_ident(self) -> Identwhere
Self: Debug,
sourcepub fn ident(self) -> Option<Ident>
pub fn ident(self) -> Option<Ident>
Returns Some
if self
is of variant Ident
, and None
otherwise.
sourcepub fn is_media_query_list(&self) -> bool
pub fn is_media_query_list(&self) -> bool
Returns true
if self
is of variant MediaQueryList
.
sourcepub fn as_media_query_list(&self) -> Option<&MediaQueryList>
pub fn as_media_query_list(&self) -> Option<&MediaQueryList>
Returns Some
if self
is a reference of variant MediaQueryList
, and None
otherwise.
sourcepub fn as_mut_media_query_list(&mut self) -> Option<&mut MediaQueryList>
pub fn as_mut_media_query_list(&mut self) -> Option<&mut MediaQueryList>
Returns Some
if self
is a mutable reference of variant MediaQueryList
, and None
otherwise.
sourcepub fn expect_media_query_list(self) -> MediaQueryListwhere
Self: Debug,
pub fn expect_media_query_list(self) -> MediaQueryListwhere
Self: Debug,
Unwraps the value, yielding the content of MediaQueryList
.
Panics
Panics if the value is not MediaQueryList
, with a panic message including the content of self
.
sourcepub fn media_query_list(self) -> Option<MediaQueryList>
pub fn media_query_list(self) -> Option<MediaQueryList>
Returns Some
if self
is of variant MediaQueryList
, and None
otherwise.
Trait Implementations§
source§impl Clone for CustomMediaQueryMediaType
impl Clone for CustomMediaQueryMediaType
source§fn clone(&self) -> CustomMediaQueryMediaType
fn clone(&self) -> CustomMediaQueryMediaType
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 Debug for CustomMediaQueryMediaType
impl Debug for CustomMediaQueryMediaType
source§impl<'de> Deserialize<'de> for CustomMediaQueryMediaType
impl<'de> Deserialize<'de> for CustomMediaQueryMediaType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 EqIgnoreSpan for CustomMediaQueryMediaType
impl EqIgnoreSpan for CustomMediaQueryMediaType
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<Ident> for CustomMediaQueryMediaType
impl From<Ident> for CustomMediaQueryMediaType
source§impl From<MediaQueryList> for CustomMediaQueryMediaType
impl From<MediaQueryList> for CustomMediaQueryMediaType
source§fn from(v: MediaQueryList) -> Self
fn from(v: MediaQueryList) -> Self
Converts to this type from the input type.
source§impl Hash for CustomMediaQueryMediaType
impl Hash for CustomMediaQueryMediaType
source§impl PartialEq<CustomMediaQueryMediaType> for CustomMediaQueryMediaType
impl PartialEq<CustomMediaQueryMediaType> for CustomMediaQueryMediaType
source§fn eq(&self, other: &CustomMediaQueryMediaType) -> bool
fn eq(&self, other: &CustomMediaQueryMediaType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.