Enum endbasic_core::ast::Value[][src]

pub enum Value {
    Boolean(bool),
    Double(f64),
    Integer(i32),
    Text(String),
}
Expand description

Represents an evaluated value.

Variants

Boolean(bool)

A boolean value.

Tuple Fields of Boolean

0: bool
Double(f64)

A double-precision floating point value.

Tuple Fields of Double

0: f64
Integer(i32)

An integer value.

Tuple Fields of Integer

0: i32
Text(String)

A string value.

Tuple Fields of Text

0: String

Implementations

Returns the type of the value as a VarType.

Parses a string s and constructs a Value that matches a given VarType.

Performs a logical “and” operation.

Performs a logical “or” operation.

Performs a logical “xor” operation.

Performs a logical “not” operation.

Performs an equality check.

Performs an inequality check.

Performs a less-than check.

Performs a less-than or equal-to check.

Performs a greater-than check.

Performs a greater-than or equal to check.

Performs an arithmetic addition.

Performs an arithmetic subtraction.

Performs a multiplication.

Performs an arithmetic division.

Performs a modulo operation.

Performs an arithmetic negation.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Converts the given value to a String. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.