Enum swc_css_ast::MediaInParens
source · pub enum MediaInParens {
MediaCondition(MediaCondition),
Feature(Box<MediaFeature>),
GeneralEnclosed(GeneralEnclosed),
}
Variants§
Implementations§
source§impl MediaInParens
impl MediaInParens
sourcepub fn is_media_condition(&self) -> bool
pub fn is_media_condition(&self) -> bool
Returns true
if self
is of variant MediaCondition
.
sourcepub fn as_media_condition(&self) -> Option<&MediaCondition>
pub fn as_media_condition(&self) -> Option<&MediaCondition>
Returns Some
if self
is a reference of variant MediaCondition
, and None
otherwise.
sourcepub fn as_mut_media_condition(&mut self) -> Option<&mut MediaCondition>
pub fn as_mut_media_condition(&mut self) -> Option<&mut MediaCondition>
Returns Some
if self
is a mutable reference of variant MediaCondition
, and None
otherwise.
sourcepub fn expect_media_condition(self) -> MediaConditionwhere
Self: Debug,
pub fn expect_media_condition(self) -> MediaConditionwhere Self: Debug,
Unwraps the value, yielding the content of MediaCondition
.
Panics
Panics if the value is not MediaCondition
, with a panic message including the content of self
.
sourcepub fn media_condition(self) -> Option<MediaCondition>
pub fn media_condition(self) -> Option<MediaCondition>
Returns Some
if self
is of variant MediaCondition
, and None
otherwise.
sourcepub fn is_feature(&self) -> bool
pub fn is_feature(&self) -> bool
Returns true
if self
is of variant Feature
.
sourcepub fn as_feature(&self) -> Option<&Box<MediaFeature>>
pub fn as_feature(&self) -> Option<&Box<MediaFeature>>
Returns Some
if self
is a reference of variant Feature
, and None
otherwise.
sourcepub fn as_mut_feature(&mut self) -> Option<&mut Box<MediaFeature>>
pub fn as_mut_feature(&mut self) -> Option<&mut Box<MediaFeature>>
Returns Some
if self
is a mutable reference of variant Feature
, and None
otherwise.
sourcepub fn expect_feature(self) -> Box<MediaFeature>where
Self: Debug,
pub fn expect_feature(self) -> Box<MediaFeature>where Self: Debug,
sourcepub fn feature(self) -> Option<Box<MediaFeature>>
pub fn feature(self) -> Option<Box<MediaFeature>>
Returns Some
if self
is of variant Feature
, and None
otherwise.
sourcepub fn is_general_enclosed(&self) -> bool
pub fn is_general_enclosed(&self) -> bool
Returns true
if self
is of variant GeneralEnclosed
.
sourcepub fn as_general_enclosed(&self) -> Option<&GeneralEnclosed>
pub fn as_general_enclosed(&self) -> Option<&GeneralEnclosed>
Returns Some
if self
is a reference of variant GeneralEnclosed
, and None
otherwise.
sourcepub fn as_mut_general_enclosed(&mut self) -> Option<&mut GeneralEnclosed>
pub fn as_mut_general_enclosed(&mut self) -> Option<&mut GeneralEnclosed>
Returns Some
if self
is a mutable reference of variant GeneralEnclosed
, and None
otherwise.
sourcepub fn expect_general_enclosed(self) -> GeneralEnclosedwhere
Self: Debug,
pub fn expect_general_enclosed(self) -> GeneralEnclosedwhere Self: Debug,
Unwraps the value, yielding the content of GeneralEnclosed
.
Panics
Panics if the value is not GeneralEnclosed
, with a panic message including the content of self
.
sourcepub fn general_enclosed(self) -> Option<GeneralEnclosed>
pub fn general_enclosed(self) -> Option<GeneralEnclosed>
Returns Some
if self
is of variant GeneralEnclosed
, and None
otherwise.
Trait Implementations§
source§impl Archive for MediaInParens
impl Archive for MediaInParens
§type Archived = ArchivedMediaInParens
type Archived = ArchivedMediaInParens
§type Resolver = MediaInParensResolver
type Resolver = MediaInParensResolver
source§impl Clone for MediaInParens
impl Clone for MediaInParens
source§fn clone(&self) -> MediaInParens
fn clone(&self) -> MediaInParens
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MediaInParens
impl Debug for MediaInParens
source§impl<'de> Deserialize<'de> for MediaInParens
impl<'de> Deserialize<'de> for MediaInParens
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>,
source§impl<__D> Deserialize<MediaInParens, __D> for Archived<MediaInParens>where
__D: SharedDeserializeRegistry + Fallible + ?Sized,
impl<__D> Deserialize<MediaInParens, __D> for Archived<MediaInParens>where __D: SharedDeserializeRegistry + Fallible + ?Sized,
source§fn deserialize(
&self,
deserializer: &mut __D
) -> Result<MediaInParens, __D::Error>
fn deserialize( &self, deserializer: &mut __D ) -> Result<MediaInParens, __D::Error>
source§impl EqIgnoreSpan for MediaInParens
impl EqIgnoreSpan for MediaInParens
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<Box<MediaFeature, Global>> for MediaInParens
impl From<Box<MediaFeature, Global>> for MediaInParens
source§fn from(v: Box<MediaFeature>) -> Self
fn from(v: Box<MediaFeature>) -> Self
source§impl From<GeneralEnclosed> for MediaInParens
impl From<GeneralEnclosed> for MediaInParens
source§fn from(v: GeneralEnclosed) -> Self
fn from(v: GeneralEnclosed) -> Self
source§impl From<MediaCondition> for MediaInParens
impl From<MediaCondition> for MediaInParens
source§fn from(v: MediaCondition) -> Self
fn from(v: MediaCondition) -> Self
source§impl From<MediaInParens> for MediaConditionAllType
impl From<MediaInParens> for MediaConditionAllType
source§fn from(v: MediaInParens) -> Self
fn from(v: MediaInParens) -> Self
source§impl From<MediaInParens> for MediaConditionWithoutOrType
impl From<MediaInParens> for MediaConditionWithoutOrType
source§fn from(v: MediaInParens) -> Self
fn from(v: MediaInParens) -> Self
source§impl Hash for MediaInParens
impl Hash for MediaInParens
source§impl PartialEq<MediaInParens> for MediaInParens
impl PartialEq<MediaInParens> for MediaInParens
source§fn eq(&self, other: &MediaInParens) -> bool
fn eq(&self, other: &MediaInParens) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<__S> Serialize<__S> for MediaInParenswhere
__S: Serializer + ScratchSpace + SharedSerializeRegistry + Fallible + ?Sized,
impl<__S> Serialize<__S> for MediaInParenswhere __S: Serializer + ScratchSpace + SharedSerializeRegistry + Fallible + ?Sized,
source§impl Serialize for MediaInParens
impl Serialize for MediaInParens
source§impl Spanned for MediaInParens
impl Spanned for MediaInParens
impl Eq for MediaInParens
impl StructuralEq for MediaInParens
impl StructuralPartialEq for MediaInParens
Auto Trait Implementations§
impl RefUnwindSafe for MediaInParens
impl Send for MediaInParens
impl Sync for MediaInParens
impl Unpin for MediaInParens
impl UnwindSafe for MediaInParens
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive
, it may be unsized. Read more§type MetadataResolver = ()
type MetadataResolver = ()
source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata )
source§impl<T> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere T: Hash + ?Sized,
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.