pub enum Line {
Empty,
Comment(Comment),
Definition(AttributeDefinition, Option<Comment>),
Directive(Directive, Option<Comment>),
}
Expand description
A Line
in a DSDL File
A data structure definition consists of attributes and directives. Any line of the definition file may contain at most one attribute definition or at most one directive. The same line cannot contain an attribute definition and a directive at the same time.
Variants§
Empty
Comment(Comment)
Definition(AttributeDefinition, Option<Comment>)
Directive(Directive, Option<Comment>)
Implementations§
Source§impl Line
impl Line
Sourcepub fn is_directive(&self) -> bool
pub fn is_directive(&self) -> bool
returns true if the Line
contains a directive
Sourcepub fn is_definition(&self) -> bool
pub fn is_definition(&self) -> bool
returns true if the Line
contains a definiition
Sourcepub fn is_comment(&self) -> bool
pub fn is_comment(&self) -> bool
returns true if the Line
is nothing but a comment
Sourcepub fn has_comment(&self) -> bool
pub fn has_comment(&self) -> bool
returns true if the Line
contains a comment
Trait Implementations§
impl Eq for Line
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl Freeze for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
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