pub enum Token<'a> {
Field(Field<'a>),
Comment {
is_inline: bool,
inner: Cow<'a, str>,
},
}Expand description
The output struct for g-code emission implementing std::fmt::Display
Any strings here are expected to have escaped characters, see https://www.reprap.org/wiki/G-code#Quoted_strings
Variants§
Trait Implementations§
source§impl<'a, 'input: 'a> From<&'a InlineComment<'input>> for Token<'input>
impl<'a, 'input: 'a> From<&'a InlineComment<'input>> for Token<'input>
source§fn from(comment: &'a ParsedInlineComment<'input>) -> Self
fn from(comment: &'a ParsedInlineComment<'input>) -> Self
Converts to this type from the input type.
source§impl<'input> From<&Comment<'input>> for Token<'input>
impl<'input> From<&Comment<'input>> for Token<'input>
source§fn from(comment: &ParsedComment<'input>) -> Self
fn from(comment: &ParsedComment<'input>) -> Self
Converts to this type from the input type.
source§impl<'input> From<&Field<'input>> for Token<'input>
impl<'input> From<&Field<'input>> for Token<'input>
source§fn from(field: &ParsedField<'input>) -> Self
fn from(field: &ParsedField<'input>) -> Self
Converts to this type from the input type.
source§impl<'a> PartialEq<Token<'a>> for Token<'a>
impl<'a> PartialEq<Token<'a>> for Token<'a>
impl<'a> StructuralPartialEq for Token<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Token<'a>
impl<'a> Send for Token<'a>
impl<'a> Sync for Token<'a>
impl<'a> Unpin for Token<'a>
impl<'a> UnwindSafe for Token<'a>
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