[−][src]Struct gcode::Line
Methods
impl<'input, B: Buffers<'input>> Line<'input, B>
[src]
pub fn gcodes(&self) -> &[GCode<B::Arguments>]
[src]
All GCode
s in this line.
pub fn comments(&self) -> &[Comment<'input>]
[src]
All Comment
s in this line.
pub fn push_gcode(
&mut self,
gcode: GCode<B::Arguments>
) -> Result<(), CapacityError<GCode<B::Arguments>>>
[src]
&mut self,
gcode: GCode<B::Arguments>
) -> Result<(), CapacityError<GCode<B::Arguments>>>
Try to add another GCode
to the line.
pub fn push_comment(
&mut self,
comment: Comment<'input>
) -> Result<(), CapacityError<Comment<'input>>>
[src]
&mut self,
comment: Comment<'input>
) -> Result<(), CapacityError<Comment<'input>>>
Try to add a Comment
to the line.
pub fn is_empty(&self) -> bool
[src]
Does the Line
contain anything at all?
pub fn line_number(&self) -> Option<Word>
[src]
Try to get the line number, if there was one.
pub fn set_line_number<W: Into<Option<Word>>>(&mut self, line_number: W)
[src]
Set the Line::line_number()
.
pub fn span(&self) -> Span
[src]
Get the Line
's position in its source text.
Trait Implementations
impl<'input, B: Clone + Buffers<'input>> Clone for Line<'input, B> where
B::Commands: Clone,
B::Comments: Clone,
[src]
B::Commands: Clone,
B::Comments: Clone,
impl<'input, B> Debug for Line<'input, B> where
B: Buffers<'input>,
[src]
B: Buffers<'input>,
impl<'input, B> Default for Line<'input, B> where
B: Buffers<'input>,
B::Commands: Default,
B::Comments: Default,
[src]
B: Buffers<'input>,
B::Commands: Default,
B::Comments: Default,
impl<'de, 'input, B: Buffers<'input>> Deserialize<'de> for Line<'input, B> where
B::Commands: Deserialize<'de>,
B::Comments: Deserialize<'de>,
[src]
B::Commands: Deserialize<'de>,
B::Comments: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'input, B: PartialEq + Buffers<'input>> PartialEq<Line<'input, B>> for Line<'input, B> where
B::Commands: PartialEq,
B::Comments: PartialEq,
[src]
B::Commands: PartialEq,
B::Comments: PartialEq,
fn eq(&self, other: &Line<'input, B>) -> bool
[src]
fn ne(&self, other: &Line<'input, B>) -> bool
[src]
impl<'input, B: Buffers<'input>> Serialize for Line<'input, B> where
B::Commands: Serialize,
B::Comments: Serialize,
[src]
B::Commands: Serialize,
B::Comments: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'input, B: Buffers<'input>> StructuralPartialEq for Line<'input, B>
[src]
Auto Trait Implementations
impl<'input, B> RefUnwindSafe for Line<'input, B> where
<B as Buffers<'input>>::Commands: RefUnwindSafe,
<B as Buffers<'input>>::Comments: RefUnwindSafe,
<B as Buffers<'input>>::Commands: RefUnwindSafe,
<B as Buffers<'input>>::Comments: RefUnwindSafe,
impl<'input, B> Send for Line<'input, B> where
<B as Buffers<'input>>::Commands: Send,
<B as Buffers<'input>>::Comments: Send,
<B as Buffers<'input>>::Commands: Send,
<B as Buffers<'input>>::Comments: Send,
impl<'input, B> Sync for Line<'input, B> where
<B as Buffers<'input>>::Commands: Sync,
<B as Buffers<'input>>::Comments: Sync,
<B as Buffers<'input>>::Commands: Sync,
<B as Buffers<'input>>::Comments: Sync,
impl<'input, B> Unpin for Line<'input, B> where
<B as Buffers<'input>>::Commands: Unpin,
<B as Buffers<'input>>::Comments: Unpin,
<B as Buffers<'input>>::Commands: Unpin,
<B as Buffers<'input>>::Comments: Unpin,
impl<'input, B> UnwindSafe for Line<'input, B> where
<B as Buffers<'input>>::Commands: UnwindSafe,
<B as Buffers<'input>>::Comments: UnwindSafe,
<B as Buffers<'input>>::Commands: UnwindSafe,
<B as Buffers<'input>>::Comments: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,