[][src]Enum scriptful::core::value::Value

pub enum Value {
    Boolean(bool),
    Float(f64),
    Integer(i128),
    String(&'static str),
}

The only data type that can be actually pushed or pulled from a Stack.

Value has four variants that should cover most use cases, namely: Boolean, Float, Integer or String.

The point of Value is being used inside Scripts (wrapped in an Item) or to be pushed into a Stack.

As explained in known limitations, "the possible value types that can be pushed into the Stack is not generic nor customizable. Such feature will only be added if someone actually equests it".

Value does not implement any methods other than implementations of some traits from the core crate.

Variants

Boolean(bool)

A binary value: either true or false.

Float(f64)

A signed floating point value.

Integer(i128)

A signed integer value.

String(&'static str)

A string of characters.

Trait Implementations

impl Add<Value> for Value[src]

type Output = Self

The resulting type after applying the + operator.

impl Clone for Value[src]

impl Debug for Value[src]

impl Not for Value[src]

type Output = Self

The resulting type after applying the ! operator.

impl PartialEq<Value> for Value[src]

impl Sub<Value> for Value[src]

type Output = Self

The resulting type after applying the - operator.

Auto Trait Implementations

impl Send for Value

impl Sync for Value

impl Unpin for Value

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.