Struct g_code::parse::ast::Line [−][src]
pub struct Line<'input> { /* fields omitted */ }
A sequence of GCode that is either followed by a Newline or at the end of a file.
Implementations
impl<'input> Line<'input>
[src]
impl<'input> Line<'input>
[src]pub fn iter_fields(&self) -> impl Iterator<Item = &Field<'input>>
[src]
Iterate by Field in a line of GCode.
pub fn validate_checksum(&self) -> Option<Result<(), u8>>
[src]
Validates Line::checksum against the fields that the line contains.
If the line has no checksum, this will return Option::None
.
If the line does have a checksum, this will return an empty Result::Ok or an Result::Err containing the computed checksum that differs from the actual.
pub fn iter_bytes(&self) -> impl Iterator<Item = &u8>
[src]
pub fn compute_checksum(&self) -> u8
[src]
Trait Implementations
impl<'input> StructuralEq for Line<'input>
[src]
impl<'input> StructuralEq for Line<'input>
[src]impl<'input> StructuralPartialEq for Line<'input>
[src]
impl<'input> StructuralPartialEq for Line<'input>
[src]Auto Trait Implementations
impl<'input> RefUnwindSafe for Line<'input>
impl<'input> RefUnwindSafe for Line<'input>
impl<'input> UnwindSafe for Line<'input>
impl<'input> UnwindSafe for Line<'input>