pub struct A2lProject {
pub project: String,
pub modules: Vec<A2lModule>,
}Expand description
A parsed A2L database: the PROJECT name and its MODULEs.
Fields§
§project: StringPROJECT name.
modules: Vec<A2lModule>All /begin MODULE blocks, in file order.
Implementations§
Source§impl A2lProject
impl A2lProject
Sourcepub fn parse(input: &str) -> Result<Self, A2lError>
pub fn parse(input: &str) -> Result<Self, A2lError>
Parse an A2L (ASAP2) description. Keyword-driven and
block-structured: /begin NAME … /end NAME; unknown blocks and
unknown optional keywords are skipped, so real-world files with
vendor extensions parse as long as the core blocks are intact.
§Errors
[A2lError] — typed, with 1-based line numbers where applicable.
Sourcepub fn module_by_name(&self, name: &str) -> Option<&A2lModule>
pub fn module_by_name(&self, name: &str) -> Option<&A2lModule>
First module named name, in file order.
Trait Implementations§
Source§impl Clone for A2lProject
impl Clone for A2lProject
Source§impl Debug for A2lProject
impl Debug for A2lProject
Source§impl Default for A2lProject
impl Default for A2lProject
Source§impl PartialEq for A2lProject
impl PartialEq for A2lProject
impl StructuralPartialEq for A2lProject
Auto Trait Implementations§
impl Freeze for A2lProject
impl RefUnwindSafe for A2lProject
impl Send for A2lProject
impl Sync for A2lProject
impl Unpin for A2lProject
impl UnsafeUnpin for A2lProject
impl UnwindSafe for A2lProject
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