pub enum Attribute {
Name(NamedAttribute),
Group(AttributeGroup),
}Expand description
Represents a function attribute.
Attributes can be either:
- Named:
@deprecated - Grouped:
@[attribute1, attribute2(args)]
Variants§
Name(NamedAttribute)
A named attribute (e.g., @deprecated)
Group(AttributeGroup)
A group of attributes (e.g., @[attr1, attr2])
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn clear_comments(&mut self)
pub fn clear_comments(&mut self)
Clears all comments from the tokens in this node.
Sourcepub fn clear_whitespaces(&mut self)
pub fn clear_whitespaces(&mut self)
Clears all whitespaces information from the tokens in this node.
Trait Implementations§
Source§impl From<AttributeGroup> for Attribute
impl From<AttributeGroup> for Attribute
Source§fn from(v: AttributeGroup) -> Self
fn from(v: AttributeGroup) -> Self
Converts to this type from the input type.
Source§impl From<AttributeGroupElement> for Attribute
impl From<AttributeGroupElement> for Attribute
Source§fn from(v: AttributeGroupElement) -> Self
fn from(v: AttributeGroupElement) -> Self
Converts to this type from the input type.
Source§impl From<NamedAttribute> for Attribute
impl From<NamedAttribute> for Attribute
Source§fn from(v: NamedAttribute) -> Self
fn from(v: NamedAttribute) -> Self
Converts to this type from the input type.
impl Eq for Attribute
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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