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 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.
source§impl PartialEq for UrlValue
impl PartialEq for UrlValue
impl Eq for UrlValue
impl StructuralEq for UrlValue
impl StructuralPartialEq for UrlValue
Auto Trait Implementations§
impl RefUnwindSafe for UrlValue
impl Send for UrlValue
impl Sync for UrlValue
impl Unpin for UrlValue
impl UnwindSafe for UrlValue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more