Enum g_code::parse::token::Value[][src]

pub enum Value<'input> {
    Rational(Ratio<i64>),
    Integer(usize),
    String(&'input str),
}

Variants

Rational(Ratio<i64>)

A real number GCode value.

While this is often an f64 or f32, that was converted to a string, it is parsed as a Ratio to ensure numerical stability.

Integer(usize)

An unsigned integer GCode value fitting in a usize. For instance, this would be the 0 in G0.

String(&'input str)

A string GCode value.

Delimiting quotes are included in the value and escaped quotes are NOT unescaped.

Trait Implementations

impl<'input> Clone for Value<'input>[src]

impl<'input> Debug for Value<'input>[src]

impl<'input> Eq for Value<'input>[src]

impl<'input> From<&'_ Value<'input>> for Value<'input>[src]

impl<'input> PartialEq<Value<'input>> for Value<'input>[src]

impl<'input> StructuralEq for Value<'input>[src]

impl<'input> StructuralPartialEq for Value<'input>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.