[−][src]Enum arithmetic_eval::Value
Values produced by expressions during their interpretation.
Variants
Number(T::Lit)
Primitive value: a single literal.
Bool(bool)
Boolean value.
Function(Function<'a, T>)
Function.
Tuple of zero or more values.
Implementations
impl<'a, T: Grammar> Value<'a, T>
[src]
pub fn native_fn(function: impl NativeFn<T> + 'static) -> Self
[src]
Creates a value for a native function.
pub fn void() -> Self
[src]
Creates a void value (an empty tuple).
pub fn is_void(&self) -> bool
[src]
Checks if the value is void.
pub fn is_function(&self) -> bool
[src]
Checks if this value is a function.
Trait Implementations
impl<'_, T: Grammar> Clone for Value<'_, T>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, T: Debug> Debug for Value<'a, T> where
T: Grammar,
T::Lit: Debug,
[src]
T: Grammar,
T::Lit: Debug,
impl<'_, T: Grammar> PartialEq<Value<'_, T>> for Value<'_, T> where
T::Lit: PartialEq,
[src]
T::Lit: PartialEq,
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for Value<'a, T>
impl<'a, T> !Send for Value<'a, T>
impl<'a, T> !Sync for Value<'a, T>
impl<'a, T> Unpin for Value<'a, T> where
<T as Grammar>::Lit: Unpin,
<T as Grammar>::Lit: Unpin,
impl<'a, T> !UnwindSafe for Value<'a, T>
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> 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>,