pub enum Value<'input> {
Rational(Decimal),
Integer(usize),
String(&'input str),
}
Variants§
Rational(Decimal)
A real number g-code value.
While this is often an f64 or f32, that was converted to a string, it is parsed as a Decimal to ensure numerical stability.
Integer(usize)
An unsigned integer g-code value fitting in a usize. For instance, this would be the 0 in G0.
String(&'input str)
A string g-code value.
Delimiting quotes are included in the value and escaped quotes are NOT unescaped.
Trait Implementations§
source§impl<'input> From<&Value<'input>> for Value<'input>
impl<'input> From<&Value<'input>> for Value<'input>
source§fn from(val: &ParsedValue<'input>) -> Self
fn from(val: &ParsedValue<'input>) -> Self
Converts to this type from the input type.
source§impl<'input> PartialEq for Value<'input>
impl<'input> PartialEq for Value<'input>
impl<'input> Eq for Value<'input>
impl<'input> StructuralPartialEq for Value<'input>
Auto Trait Implementations§
impl<'input> Freeze for Value<'input>
impl<'input> RefUnwindSafe for Value<'input>
impl<'input> Send for Value<'input>
impl<'input> Sync for Value<'input>
impl<'input> Unpin for Value<'input>
impl<'input> UnwindSafe for Value<'input>
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