pub struct AttributeStruct<'a> {
pub type_path: &'a str,
pub const_name: &'a str,
pub scope: AttributeScope,
pub require: &'a str,
pub fields: &'a [AttributeField<'a>],
pub for_node: Option<&'a str>,
}Expand description
A user-defined struct that Config fills from DBC attributes and emits as an
associated constant in the generated message type.
Fields§
§type_path: &'a strFully-qualified path of the target Rust type.
const_name: &'a strBase name of the emitted associated constant.
scope: AttributeScopeWhether one constant is emitted per message or per matching signal.
require: &'a strOnly emit the constant when this attribute has an assigned value on the
scoped object (the message for AttributeScope::Message or the signal
for AttributeScope::Signal).
fields: &'a [AttributeField<'a>]The struct fields, written in this order.
for_node: Option<&'a str>Restrict AttributeScope::NodeSignal/AttributeScope::NodeMessage
emission to this one node and remove the node name from the generated
const. Set to None to keep the default behavior (one constant per
matching node).
Trait Implementations§
Source§impl<'a> Clone for AttributeStruct<'a>
impl<'a> Clone for AttributeStruct<'a>
Auto Trait Implementations§
impl<'a> Freeze for AttributeStruct<'a>
impl<'a> RefUnwindSafe for AttributeStruct<'a>
impl<'a> Send for AttributeStruct<'a>
impl<'a> Sync for AttributeStruct<'a>
impl<'a> Unpin for AttributeStruct<'a>
impl<'a> UnsafeUnpin for AttributeStruct<'a>
impl<'a> UnwindSafe for AttributeStruct<'a>
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