Struct Value

Source
pub struct Value { /* private fields */ }

Trait Implementations§

Source§

impl Add for Value

Source§

type Output = Value

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Value) -> <Value as Add>::Output

Performs the + operation. Read more
Source§

impl Clone for Value

Source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for Value

Source§

fn fmt(&self, _fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Div for Value

Source§

type Output = Value

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Value) -> <Value as Div>::Output

Performs the / operation. Read more
Source§

impl Mul for Value

Source§

type Output = Value

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Value) -> <Value as Mul>::Output

Performs the * operation. Read more
Source§

impl Not for Value

Source§

type Output = Value

The resulting type after applying the ! operator.
Source§

fn not(self) -> <Value as Not>::Output

Performs the unary ! operation. Read more
Source§

impl Object for Value

Source§

fn new(value_type: Type, contents: Vec<Number>) -> Value

Source§

fn get_type(&self) -> Type

Source§

fn get_list(&self) -> Vec<Value>

Source§

fn get_contents(&self) -> Vec<Number>

Source§

fn get_attributes(&self) -> Table<Value>

Source§

fn get_foreign_function(&self) -> fn(Value) -> Value

Source§

fn set_type(&mut self, value_type: Type)

Source§

fn set_list(&mut self, list: Vec<Value>)

Source§

fn set_contents(&mut self, contents: Vec<Number>)

Source§

fn set_attributes(&mut self, attributes: Table<Value>)

Source§

fn set_foreign_function(&mut self, function: fn(Value) -> Value)

Source§

fn empty_instance() -> Self

Source§

fn from_string(string: String) -> Self

Source§

fn from_str(string: &str) -> Self

Source§

fn from_f64(decimal: f64) -> Self

Source§

fn from_number(n: Number) -> Self

Source§

fn from_instruction(instruction: Instruction) -> Self

Source§

fn from_problem(problem: Problem) -> Self

Source§

fn from_vector(vector: Vec<Self>) -> Self

Source§

fn from_nothing() -> Self

Source§

fn from_function(vector: Vec<Self>) -> Self

Source§

fn from_foreign_function(function: fn(Self) -> Self) -> Self

Source§

fn get_attr(&self, name: String) -> Self

Source§

fn as_number(&self) -> Number

Source§

fn as_usize(&self) -> usize

Source§

fn as_string(&self) -> String

Source§

fn as_list(&self) -> Vec<Self>

Source§

fn as_instruction(&self) -> Instruction

Source§

fn as_instance(&self) -> Table<Self>

Source§

fn as_foreign_function(&self) -> fn(Self) -> Self

Source§

fn set_attr(&mut self, name: String, object: Self)

Source§

fn get_attr_recursive(&mut self, names: Vec<String>) -> Self

Source§

fn set_attr_recursive(&mut self, names: Vec<String>, object: Self) -> Self

Source§

fn index(&mut self, index: Self) -> Self

Source§

fn list_push(&mut self, object: Self)

Source§

fn list_pop(&mut self) -> Self

Source§

fn call_foreign_function(&mut self, parameter: Self) -> Self

Source§

fn format(&self) -> String

Source§

fn print(&self)

Source§

fn println(&self)

Source§

impl Ord for Value

Source§

fn cmp(&self, other: &Value) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Value

Source§

fn eq(&self, other: &Value) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Value

Source§

fn partial_cmp(&self, other: &Value) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Rem for Value

Source§

type Output = Value

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Value) -> <Value as Rem>::Output

Performs the % operation. Read more
Source§

impl Sub for Value

Source§

type Output = Value

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Value) -> <Value as Sub>::Output

Performs the - operation. Read more
Source§

impl Eq for Value

Source§

impl StructuralPartialEq for Value

Auto Trait Implementations§

§

impl Freeze for Value

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.