Enum dsdl_parser::Line
[−]
[src]
pub enum Line { Empty, Comment(Comment), Definition(AttributeDefinition, Option<Comment>), Directive(Directive, Option<Comment>), }
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>)
Methods
impl Line
[src]
fn is_empty(&self) -> bool
[src]
returns true if the Line
is empty
fn is_directive(&self) -> bool
[src]
returns true if the Line
contains a directive
fn is_definition(&self) -> bool
[src]
returns true if the Line
contains a definiition
fn is_comment(&self) -> bool
[src]
returns true if the Line
is nothing but a comment
fn has_comment(&self) -> bool
[src]
returns true if the Line
contains a comment
Trait Implementations
impl Display for Line
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl Clone for Line
[src]
fn clone(&self) -> Line
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Line
[src]
impl PartialEq for Line
[src]
fn eq(&self, __arg_0: &Line) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Line) -> bool
[src]
This method tests for !=
.