pub struct AttrParams(/* private fields */);Implementations§
Source§impl AttrParams
impl AttrParams
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn iter(&self) -> impl Iterator<Item = &AttrParam>
Sourcepub fn no_duplicates(&self)
pub fn no_duplicates(&self)
Shows compile errors for duplicate names.
Sourcepub fn no_duplicates_by<F: Fn(&Ident) -> bool>(&self, f: F)
pub fn no_duplicates_by<F: Fn(&Ident) -> bool>(&self, f: F)
f should return true if the ident is not allowed to be a duplicate.
pub fn retain_known<F: Fn(&Ident) -> bool>(&self, f: F)
pub fn has_named(&self) -> bool
pub fn no_unnamed(&self)
Sourcepub fn no_names_mixed(&self)
pub fn no_names_mixed(&self)
Shows compile errors if named parameters are mixed with unnamed ones.
Trait Implementations§
Source§impl Clone for AttrParams
impl Clone for AttrParams
Source§fn clone(&self) -> AttrParams
fn clone(&self) -> AttrParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttrParams
impl Debug for AttrParams
Source§impl IntoIterator for AttrParams
impl IntoIterator for AttrParams
Source§impl Parse for AttrParams
impl Parse for AttrParams
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl ToTokens for AttrParams
impl ToTokens for AttrParams
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for AttrParams
impl RefUnwindSafe for AttrParams
impl !Send for AttrParams
impl !Sync for AttrParams
impl Unpin for AttrParams
impl UnwindSafe for AttrParams
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§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.