[][src]Enum piske::value::Value

pub enum Value {
    String(String),
    Float(f64),
    Int(i64),
    Boolean(bool),
    Complex(f64f64),
    Set(Box<ValueSet>),
    Return(Box<Value>),
    Break(Box<Value>),
    Empty,
}

Value type for run-time memory values.

Variants

String(String)

Storage for string value

Float(f64)

Storage for floating point number value

Int(i64)

Storage for integer number value

Boolean(bool)

Storage for a boolean,

Complex(f64f64)

Storage for a complex number,

Set(Box<ValueSet>)

Storage for a set

Return(Box<Value>)

Indication of a value returned from a function

Break(Box<Value>)

Indication of a value resulting from a break in a loop

Empty

Indication of empty / null value

Methods

impl Value[src]

pub fn has_same_type(&self, other: &Value) -> bool[src]

Returns true if the associated type for this value is the same type as the associated type of the other value. Returns false otherwise.

Trait Implementations

impl PartialOrd<Value> for Value[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Clone for Value[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Value> for Value[src]

impl From<Literal> for Value[src]

impl<'a> From<&'a Value> for PType[src]

impl Display for Value[src]

impl Debug for Value[src]

impl<'a> Add<&'a Value> for &'a Value[src]

type Output = Value

The resulting type after applying the + operator.

impl MemoryStore<Value> for Annotation[src]

impl Value for Value[src]

impl Coerce<PType> for Value[src]

impl Cast<PType> for Value[src]

impl Extract<u64> for Value[src]

impl Extract<usize> for Value[src]

impl Extract<i64> for Value[src]

impl Extract<String> for Value[src]

impl Extract<f64> for Value[src]

impl Extract<Complex> for Value[src]

impl BinaryOperator<PType, Value> for InfixOp[src]

impl UnaryOperator<PType, Value> for PrefixOp[src]

impl UnaryOperator<PType, Value> for PostfixOp[src]

Auto Trait Implementations

impl Send for Value

impl Sync for Value

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.

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

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

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

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.