pub struct Line<'input, B: Buffers<'input> = DefaultBuffers> { /* private fields */ }
Implementations§
Source§impl<'input, B: Buffers<'input>> Line<'input, B>
impl<'input, B: Buffers<'input>> Line<'input, B>
Sourcepub fn push_gcode(
&mut self,
gcode: GCode<B::Arguments>,
) -> Result<(), CapacityError<GCode<B::Arguments>>>
pub fn push_gcode( &mut self, gcode: GCode<B::Arguments>, ) -> Result<(), CapacityError<GCode<B::Arguments>>>
Try to add another GCode
to the line.
Sourcepub fn push_comment(
&mut self,
comment: Comment<'input>,
) -> Result<(), CapacityError<Comment<'input>>>
pub fn push_comment( &mut self, comment: Comment<'input>, ) -> Result<(), CapacityError<Comment<'input>>>
Try to add a Comment
to the line.
Sourcepub fn line_number(&self) -> Option<Word>
pub fn line_number(&self) -> Option<Word>
Try to get the line number, if there was one.
Sourcepub fn set_line_number<W: Into<Option<Word>>>(&mut self, line_number: W)
pub fn set_line_number<W: Into<Option<Word>>>(&mut self, line_number: W)
Set the Line::line_number()
.
Trait Implementations§
Source§impl<'de, 'input, B: Buffers<'input>> Deserialize<'de> for Line<'input, B>
impl<'de, 'input, B: Buffers<'input>> Deserialize<'de> for Line<'input, B>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'input, B: Buffers<'input>> StructuralPartialEq for Line<'input, B>
Auto Trait Implementations§
impl<'input, B> Freeze for Line<'input, B>
impl<'input, B> RefUnwindSafe for Line<'input, B>where
<B as Buffers<'input>>::Commands: RefUnwindSafe,
<B as Buffers<'input>>::Comments: RefUnwindSafe,
impl<'input, B> Send for Line<'input, B>
impl<'input, B> Sync for Line<'input, B>
impl<'input, B> Unpin for Line<'input, B>
impl<'input, B> UnwindSafe for Line<'input, B>
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