Enum ketree::tree::Expression
[−]
pub enum Expression<T: 'static + Clone + Debug> { Operator(fn(_: Vec<T>) -> T), Variable(String), Constant(T), }
Enumerator for the types of data that a Tree vertex might contain.
Operator contains a function of fn(Vec
Variants
Operator(fn(_: Vec<T>) -> T)
Variable(String)
Constant(T)
Trait Implementations
impl<T: Clone + 'static + Clone + Debug> Clone for Expression<T>
[src]
fn clone(&self) -> Expression<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Debug + 'static + Clone + Debug> Debug for Expression<T>
[src]
impl<T: 'static + Clone + Debug> ForeignValue for Expression<T>
fn type_name(&self) -> &'static str
Return the value's type name.
fn compare_to(
&self,
rhs: &(ForeignValue + 'static)
) -> Result<Ordering, ExecError>
&self,
rhs: &(ForeignValue + 'static)
) -> Result<Ordering, ExecError>
Performs ordered comparison between two values of a foreign type. Read more
fn compare_to_value(&self, rhs: &Value) -> Result<Ordering, ExecError>
Performs ordered comparison between two values. Read more
fn is_identical_to(&self, rhs: &(ForeignValue + 'static)) -> bool
Returns whether the two values are identical. This concept is the same as equality, except in the case of floating point values, where two NaN
values are considered identical. Read more
fn is_equal_to(&self, rhs: &(ForeignValue + 'static)) -> Result<bool, ExecError>
Tests for equality between two values of a foreign type. Read more
fn is_equal_to_value(&self, rhs: &Value) -> Result<bool, ExecError>
Tests for equality between two values. Read more
fn fmt_debug(&self, names: &NameStore, f: &mut Formatter) -> Result<(), Error>
Format the value in debugging mode. Read more
fn fmt_display(&self, names: &NameStore, f: &mut Formatter) -> Result<(), Error>
Format the value in display mode. Read more
fn is_type(&self, name: &str) -> bool
Returns whether this value is of the named type. Read more
fn call_value(&self, ctx: &Context, args: &mut [Value]) -> Result<Value, Error>
Calls the value as a function. Read more
fn size(&self) -> usize
Returns an estimate of the memory held by this value. Read more
impl<T: 'static + Clone + Debug> FromValue for Expression<T>
fn from_value(v: Value) -> Result<Self, ExecError>
Consumes the Value
and returns a Rust value
impl<'value, T: 'static + Clone + Debug> FromValueRef<'value> for &'value Expression<T>
fn from_value_ref(v: &'value Value) -> Result<Self, ExecError>
Returns the borrowed value