pub struct AttributeUsage {
pub name: String,
pub typing: Option<String>,
pub subsets: Option<String>,
pub redefines: Option<String>,
pub references: Option<String>,
pub crosses: 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>,
pub direction: Option<InOut>,
}Expand description
Attribute usage: attribute name (:> | : type)? redefines? value? body.
Fields§
§name: String§typing: Option<String>Type after : or :>, e.g. Some(“MassValue”).
subsets: Option<String>Subsets target after :> / subsets.
redefines: Option<String>Redefines target, e.g. Some(“Vehicle::mass”).
references: Option<String>References target after ::> / references.
crosses: Option<String>Crosses target after => / crosses.
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).
direction: Option<InOut>Direction prefix when parsed as in/out/inout attribute ... (e.g. in port def bodies).
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
impl Eq 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 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