Struct ketos::value::ForeignFn
[−]
[src]
pub struct ForeignFn<F> { /* fields omitted */ }
Represents a foreign value that contains a callable function or closure
Trait Implementations
impl<F> Debug for ForeignFn<F>
[src]
impl<F> ForeignValue for ForeignFn<F> where F: Any + Fn(&Context, &mut [Value]) -> Result<Value, Error>
[src]
fn compare_to(&self, _rhs: &ForeignValue) -> Result<Ordering, ExecError>
Performs ordered comparison between two values of a foreign type. Read more
fn fmt_debug(&self, names: &NameStore, f: &mut Formatter) -> Result
Format the value in debugging mode. Read more
fn type_name(&self) -> &'static str
Return the value's type name.
fn call_value(&self, ctx: &Context, args: &mut [Value]) -> Result<Value, Error>
Calls the value as a function. 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) -> 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) -> 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_display(&self, names: &NameStore, f: &mut Formatter) -> Result
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 size(&self) -> usize
Returns an estimate of the memory held by this value. Read more