Enum swc_css_ast::UrlValue
source · [−]pub enum UrlValue {
Str(Str),
Raw(UrlValueRaw),
}
Variants
Str(Str)
Raw(UrlValueRaw)
Implementations
sourceimpl 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) -> Str where
Self: Debug,
pub fn expect_str(self) -> Str where
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) -> UrlValueRaw where
Self: Debug,
pub fn expect_raw(self) -> UrlValueRaw where
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
sourceimpl<'de> Deserialize<'de> for UrlValue
impl<'de> Deserialize<'de> for UrlValue
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 UrlValue
impl EqIgnoreSpan for UrlValue
fn eq_ignore_span(&self, other: &Self) -> bool
sourceimpl From<UrlValueRaw> for UrlValue
impl From<UrlValueRaw> for UrlValue
sourcefn from(v: UrlValueRaw) -> Self
fn from(v: UrlValueRaw) -> Self
Converts to this type from the input type.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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