[−][src]Enum endbasic_core::ast::Value
Represents an evaluated value.
Variants
Boolean(bool)A boolean value.
Double(f64)A double-precision floating point value.
Integer(i32)An integer value.
Text(String)A string value.
Implementations
impl Value[src]
pub fn parse_as<T: Into<String>>(vtype: VarType, s: T) -> Result<Value>[src]
Parses a string s and constructs a Value that matches a given VarType.
pub fn and(&self, other: &Self) -> Result<Self>[src]
Performs a logical "and" operation.
pub fn or(&self, other: &Self) -> Result<Self>[src]
Performs a logical "or" operation.
pub fn xor(&self, other: &Self) -> Result<Self>[src]
Performs a logical "xor" operation.
pub fn not(&self) -> Result<Self>[src]
Performs a logical "not" operation.
pub fn eq(&self, other: &Self) -> Result<Self>[src]
Performs an equality check.
pub fn ne(&self, other: &Self) -> Result<Self>[src]
Performs an inequality check.
pub fn lt(&self, other: &Self) -> Result<Self>[src]
Performs a less-than check.
pub fn le(&self, other: &Self) -> Result<Self>[src]
Performs a less-than or equal-to check.
pub fn gt(&self, other: &Self) -> Result<Self>[src]
Performs a greater-than check.
pub fn ge(&self, other: &Self) -> Result<Self>[src]
Performs a greater-than or equal to check.
pub fn add(&self, other: &Self) -> Result<Self>[src]
Performs an arithmetic addition.
pub fn sub(&self, other: &Self) -> Result<Self>[src]
Performs an arithmetic subtraction.
pub fn mul(&self, other: &Self) -> Result<Self>[src]
Performs a multiplication.
pub fn div(&self, other: &Self) -> Result<Self>[src]
Performs an arithmetic division.
pub fn modulo(&self, other: &Self) -> Result<Self>[src]
Performs a modulo operation.
pub fn neg(&self) -> Result<Self>[src]
Performs an arithmetic negation.
Trait Implementations
impl Clone for Value[src]
impl Debug for Value[src]
impl From<&'_ str> for Value[src]
impl From<bool> for Value[src]
impl From<f64> for Value[src]
impl From<i32> for Value[src]
impl PartialEq<Value> for Value[src]
impl StructuralPartialEq for Value[src]
impl ToString for Value[src]
Auto Trait Implementations
impl RefUnwindSafe for Value[src]
impl Send for Value[src]
impl Sync for Value[src]
impl Unpin for Value[src]
impl UnwindSafe for Value[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,