pub struct AttributeUsage {
pub name: String,
pub typing: Option<String>,
pub redefines: Option<String>,
pub value: Option<Node<Expression>>,
pub body: AttributeBody,
pub name_span: Option<Span>,
pub typing_span: Option<Span>,
pub redefines_span: Option<Span>,
}Expand description
Attribute usage: attribute name (:> | : type)? redefines? value? body.
Fields§
§name: String§typing: Option<String>Type after : or :>, e.g. Some(“MassValue”).
redefines: Option<String>Redefines target, e.g. Some(“Vehicle::mass”).
value: Option<Node<Expression>>Value expression.
body: AttributeBody§name_span: Option<Span>Span of the usage name (for semantic tokens).
typing_span: Option<Span>Span of the type after : / :>, if present (for semantic tokens).
redefines_span: Option<Span>Span of the redefines target after redefines, if present (for semantic tokens).
Trait Implementations§
Source§impl Clone for AttributeUsage
impl Clone for AttributeUsage
Source§fn clone(&self) -> AttributeUsage
fn clone(&self) -> AttributeUsage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AttributeUsage
impl Debug for AttributeUsage
Source§impl PartialEq for AttributeUsage
impl PartialEq for AttributeUsage
Source§fn eq(&self, other: &AttributeUsage) -> bool
fn eq(&self, other: &AttributeUsage) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for AttributeUsage
impl StructuralPartialEq for AttributeUsage
Auto Trait Implementations§
impl Freeze for AttributeUsage
impl RefUnwindSafe for AttributeUsage
impl Send for AttributeUsage
impl Sync for AttributeUsage
impl Unpin for AttributeUsage
impl UnsafeUnpin for AttributeUsage
impl UnwindSafe for AttributeUsage
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