pub enum Token<'a> {
Field(Field<'a>),
Flag(Flag<'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<'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<'input> From<&Flag<'input>> for Token<'input>
impl<'input> From<&Flag<'input>> for Token<'input>
Source§fn from(flag: &ParsedFlag<'input>) -> Self
fn from(flag: &ParsedFlag<'input>) -> Self
Converts to this type from the input type.
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.
impl<'a> StructuralPartialEq for Token<'a>
Auto Trait Implementations§
impl<'a> Freeze for Token<'a>
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)