pub struct Attribute { /* private fields */ }
Available on crate feature
lua54
only.Expand description
An attribute on a local variable, <const>
in local x <const>
Implementations§
source§impl Attribute
impl Attribute
sourcepub fn new(name: TokenReference) -> Self
pub fn new(name: TokenReference) -> Self
Creates a new Label with the given name
sourcepub fn name(&self) -> &TokenReference
pub fn name(&self) -> &TokenReference
The name used for the attribute, the const
part of <const>
sourcepub fn brackets(&self) -> &ContainedSpan
pub fn brackets(&self) -> &ContainedSpan
The angle brackets (<
and >
) surrounding the attribute
sourcepub fn with_name(self, name: TokenReference) -> Self
pub fn with_name(self, name: TokenReference) -> Self
Returns a new Attribute with the given attribute name
sourcepub fn with_brackets(self, brackets: ContainedSpan) -> Self
pub fn with_brackets(self, brackets: ContainedSpan) -> Self
Returns a new Attribute with the given angle brackets
Trait Implementations§
source§impl<'de> Deserialize<'de> for Attribute
impl<'de> Deserialize<'de> for Attribute
source§fn 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
source§impl Node for Attribute
impl Node for Attribute
source§fn start_position(&self) -> Option<Position>
fn start_position(&self) -> Option<Position>
The start position of a node. None if can’t be determined
source§fn end_position(&self) -> Option<Position>
fn end_position(&self) -> Option<Position>
The end position of a node. None if it can’t be determined
source§fn similar(&self, other: &Self) -> bool
fn similar(&self, other: &Self) -> bool
Whether another node of the same type is the same as this one semantically, ignoring position
source§impl PartialEq for Attribute
impl PartialEq for Attribute
impl Eq for Attribute
impl StructuralEq for Attribute
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin 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