Enum swc_css_ast::UrlValue
source · pub enum UrlValue {
Str(Str),
Raw(UrlValueRaw),
}
Variants§
Str(Str)
Raw(UrlValueRaw)
Implementations§
source§impl UrlValue
impl UrlValue
sourcepub fn as_str(&self) -> Option<&Str>
pub fn as_str(&self) -> Option<&Str>
Returns Some
if self
is a reference of variant Str
, and None
otherwise.
sourcepub fn as_mut_str(&mut self) -> Option<&mut Str>
pub fn as_mut_str(&mut self) -> Option<&mut Str>
Returns Some
if self
is a mutable reference of variant Str
, and None
otherwise.
sourcepub fn expect_str(self) -> Strwhere
Self: Debug,
pub fn expect_str(self) -> Strwhere
Self: Debug,
sourcepub fn as_raw(&self) -> Option<&UrlValueRaw>
pub fn as_raw(&self) -> Option<&UrlValueRaw>
Returns Some
if self
is a reference of variant Raw
, and None
otherwise.
sourcepub fn as_mut_raw(&mut self) -> Option<&mut UrlValueRaw>
pub fn as_mut_raw(&mut self) -> Option<&mut UrlValueRaw>
Returns Some
if self
is a mutable reference of variant Raw
, and None
otherwise.
sourcepub fn expect_raw(self) -> UrlValueRawwhere
Self: Debug,
pub fn expect_raw(self) -> UrlValueRawwhere
Self: Debug,
sourcepub fn raw(self) -> Option<UrlValueRaw>
pub fn raw(self) -> Option<UrlValueRaw>
Returns Some
if self
is of variant Raw
, and None
otherwise.
Trait Implementations§
source§impl<'de> Deserialize<'de> for UrlValue
impl<'de> Deserialize<'de> for UrlValue
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 UrlValue
impl EqIgnoreSpan for UrlValue
fn eq_ignore_span(&self, other: &Self) -> bool
source§impl From<UrlValueRaw> for UrlValue
impl From<UrlValueRaw> for UrlValue
source§fn from(v: UrlValueRaw) -> Self
fn from(v: UrlValueRaw) -> Self
Converts to this type from the input type.