pub trait A2lObject<T> {
// Required methods
fn get_layout(&self) -> &BlockInfo<T>;
fn get_layout_mut(&mut self) -> &mut BlockInfo<T>;
fn reset_location(&mut self);
fn merge_includes(&mut self);
fn get_line(&self) -> u32;
}
Expand description
The trait A2lObject
is implemented for all a2l objects as well as all objects generated by the a2ml_specification
! macro.
It gives access to layout and location data which is tracked for each object in an a2l file.
Required Methods§
sourcefn get_layout(&self) -> &BlockInfo<T>
fn get_layout(&self) -> &BlockInfo<T>
get a reference to the BlockInfo
that describes the layout of the a2l object
sourcefn get_layout_mut(&mut self) -> &mut BlockInfo<T>
fn get_layout_mut(&mut self) -> &mut BlockInfo<T>
get a mutable reference to the BlockInfo
that describes the layout of the a2l object
sourcefn reset_location(&mut self)
fn reset_location(&mut self)
reset the location information on the a2l object. It will be treated like a new object when writing a file
sourcefn merge_includes(&mut self)
fn merge_includes(&mut self)
reset the reference to an include file on this objct and its children. This causes the object to be written into the output file instead of referenced through /include “filename”