pub(crate) struct AttrStrRef<'a>(Option<AttrStrRefInner<'a>>);Expand description
A reference to an attribute value as &str. Keeps the borrow alive.
Tuple Fields§
§0: Option<AttrStrRefInner<'a>>Implementations§
Source§impl<'a> AttrStrRef<'a>
impl<'a> AttrStrRef<'a>
Sourcepub(in dom::element) fn maybe_new(
attrs: AttributesBorrow<'a>,
namespace: &Namespace,
local_name: &LocalName,
) -> Option<AttrStrRef<'a>>
pub(in dom::element) fn maybe_new( attrs: AttributesBorrow<'a>, namespace: &Namespace, local_name: &LocalName, ) -> Option<AttrStrRef<'a>>
Create a new AttrStrRef from localname. Returns None if the attribute was not found.
Sourcepub(crate) fn as_attr_ref<'b>(&'b self) -> AttrRef<'b>
pub(crate) fn as_attr_ref<'b>(&'b self) -> AttrRef<'b>
Return the AttrRef from the AttrStrRef.
pub(crate) fn is_empty(&self) -> bool
pub(crate) fn eq_ignore_ascii_case(&self, other: &str) -> bool
Trait Implementations§
Source§impl<'a> Default for AttrStrRef<'a>
impl<'a> Default for AttrStrRef<'a>
Source§fn default() -> AttrStrRef<'a>
fn default() -> AttrStrRef<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for AttrStrRef<'a>
impl<'a> !RefUnwindSafe for AttrStrRef<'a>
impl<'a> !Send for AttrStrRef<'a>
impl<'a> !Sync for AttrStrRef<'a>
impl<'a> Unpin for AttrStrRef<'a>
impl<'a> UnsafeUnpin for AttrStrRef<'a>
impl<'a> !UnwindSafe for AttrStrRef<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert