pub struct AttrQuery<'attr> { /* private fields */ }
Implementations§
source§impl<'attr> AttrQuery<'attr>
impl<'attr> AttrQuery<'attr>
pub fn tt_values(self) -> impl Iterator<Item = &'attr Subtree>
pub fn string_value(self) -> Option<&'attr Symbol>
pub fn string_value_with_span(self) -> Option<(&'attr Symbol, Span)>
pub fn string_value_unescape(self) -> Option<Cow<'attr, str>>
pub fn exists(self) -> bool
pub fn attrs(self) -> impl Iterator<Item = &'attr Attr> + Clone
sourcepub fn find_string_value_in_tt(self, key: &'attr Symbol) -> Option<&'attr str>
pub fn find_string_value_in_tt(self, key: &'attr Symbol) -> Option<&'attr str>
Find string value for a specific key inside token tree
ⓘ
#[doc(html_root_url = "url")]
^^^^^^^^^^^^^ key
Trait Implementations§
impl<'attr> Copy for AttrQuery<'attr>
Auto Trait Implementations§
impl<'attr> Freeze for AttrQuery<'attr>
impl<'attr> RefUnwindSafe for AttrQuery<'attr>
impl<'attr> Send for AttrQuery<'attr>
impl<'attr> Sync for AttrQuery<'attr>
impl<'attr> Unpin for AttrQuery<'attr>
impl<'attr> UnwindSafe for AttrQuery<'attr>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more