Enum swc_css_ast::MediaFeatureValue
source · [−]Variants
Number(Number)
Dimension(Dimension)
Ident(Ident)
Ratio(Ratio)
Implementations
sourceimpl MediaFeatureValue
impl MediaFeatureValue
sourcepub fn as_number(&self) -> Option<&Number>
pub fn as_number(&self) -> Option<&Number>
Returns Some
if self
is a reference of variant Number
, and None
otherwise.
sourcepub fn as_mut_number(&mut self) -> Option<&mut Number>
pub fn as_mut_number(&mut self) -> Option<&mut Number>
Returns Some
if self
is a mutable reference of variant Number
, and None
otherwise.
sourcepub fn expect_number(self) -> Numberwhere
Self: Debug,
pub fn expect_number(self) -> Numberwhere
Self: Debug,
sourcepub fn number(self) -> Option<Number>
pub fn number(self) -> Option<Number>
Returns Some
if self
is of variant Number
, and None
otherwise.
sourcepub fn is_dimension(&self) -> bool
pub fn is_dimension(&self) -> bool
Returns true
if self
is of variant Dimension
.
sourcepub fn as_dimension(&self) -> Option<&Dimension>
pub fn as_dimension(&self) -> Option<&Dimension>
Returns Some
if self
is a reference of variant Dimension
, and None
otherwise.
sourcepub fn as_mut_dimension(&mut self) -> Option<&mut Dimension>
pub fn as_mut_dimension(&mut self) -> Option<&mut Dimension>
Returns Some
if self
is a mutable reference of variant Dimension
, and None
otherwise.
sourcepub fn expect_dimension(self) -> Dimensionwhere
Self: Debug,
pub fn expect_dimension(self) -> Dimensionwhere
Self: Debug,
sourcepub fn dimension(self) -> Option<Dimension>
pub fn dimension(self) -> Option<Dimension>
Returns Some
if self
is of variant Dimension
, and None
otherwise.
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 as_ratio(&self) -> Option<&Ratio>
pub fn as_ratio(&self) -> Option<&Ratio>
Returns Some
if self
is a reference of variant Ratio
, and None
otherwise.
sourcepub fn as_mut_ratio(&mut self) -> Option<&mut Ratio>
pub fn as_mut_ratio(&mut self) -> Option<&mut Ratio>
Returns Some
if self
is a mutable reference of variant Ratio
, and None
otherwise.
sourcepub fn expect_ratio(self) -> Ratiowhere
Self: Debug,
pub fn expect_ratio(self) -> Ratiowhere
Self: Debug,
Trait Implementations
sourceimpl Clone for MediaFeatureValue
impl Clone for MediaFeatureValue
sourcefn clone(&self) -> MediaFeatureValue
fn clone(&self) -> MediaFeatureValue
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MediaFeatureValue
impl Debug for MediaFeatureValue
sourceimpl<'de> Deserialize<'de> for MediaFeatureValue
impl<'de> Deserialize<'de> for MediaFeatureValue
sourcefn 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
sourceimpl EqIgnoreSpan for MediaFeatureValue
impl EqIgnoreSpan for MediaFeatureValue
fn eq_ignore_span(&self, other: &Self) -> bool
sourceimpl From<Dimension> for MediaFeatureValue
impl From<Dimension> for MediaFeatureValue
sourceimpl From<Ident> for MediaFeatureValue
impl From<Ident> for MediaFeatureValue
sourceimpl From<Number> for MediaFeatureValue
impl From<Number> for MediaFeatureValue
sourceimpl From<Ratio> for MediaFeatureValue
impl From<Ratio> for MediaFeatureValue
sourceimpl Hash for MediaFeatureValue
impl Hash for MediaFeatureValue
sourceimpl PartialEq<MediaFeatureValue> for MediaFeatureValue
impl PartialEq<MediaFeatureValue> for MediaFeatureValue
sourcefn eq(&self, other: &MediaFeatureValue) -> bool
fn eq(&self, other: &MediaFeatureValue) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for MediaFeatureValue
impl Serialize for MediaFeatureValue
sourceimpl Spanned for MediaFeatureValue
impl Spanned for MediaFeatureValue
impl Eq for MediaFeatureValue
impl StructuralEq for MediaFeatureValue
impl StructuralPartialEq for MediaFeatureValue
Auto Trait Implementations
impl RefUnwindSafe for MediaFeatureValue
impl Send for MediaFeatureValue
impl Sync for MediaFeatureValue
impl Unpin for MediaFeatureValue
impl UnwindSafe for MediaFeatureValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more