Enum ketos::value::Value [] [src]

pub enum Value {
    Unit,
    Unbound,
    Bool(bool),
    Float(f64),
    Integer(Integer),
    Ratio(Ratio),
    Struct(Rc<Struct>),
    StructDef(Rc<StructDef>),
    Name(Name),
    Keyword(Name),
    Char(char),
    String(RcString),
    Bytes(Bytes),
    Path(PathBuf),
    Quasiquote(Box<Value>, u32),
    Comma(Box<Value>, u32),
    CommaAt(Box<Value>, u32),
    Quote(Box<Value>, u32),
    List(RcVec<Value>),
    Function(Function),
    Lambda(Lambda),
    Foreign(Rc<ForeignValue>),
}

Represents a value.

Variants

()

Placeholder for missing optional values; should not be used to represent any real value.

Boolean -- true or false

Floating point number

Signed arbitrary precision integer

Arbitrary precision ratio

Struct value

Struct definition

Literal name

Keyword

Character

String

Byte string

Path

Quasiquoted value; quote depth MUST NEVER be zero.

Comma'd value; comma depth MUST NEVER be zero.

Comma-at'd value; quote depth MUST NEVER be zero.

Quoted value; quote depth MUST NEVER be zero.

Series of one or more values. MUST NEVER be of length zero. Use Unit to represent empty lists.

Function implemented in Rust

Compiled bytecode function

Boxed value of a foreign type

Methods

impl Value
[src]

Returns a value of a foreign type.

Returns a value containing a foreign function.

Compares two values; returns an error if the values cannot be compared.

Tests two values for equality; returns an error if the values cannot be compared.

Returns whether this value is identical to another. The notable difference between this and eq is that float NaN values will compare equal.

Replaces the value with Unit and returns the old value.

Returns the value, quasi-quoted.

Panics

If n would overflow.

Returns the value, comma'd.

Panics

If n would overflow.

Returns the value, comma-at'd.

Panics

If n would overflow.

Returns the value, quoted.

Panics

If n would overflow.

Returns a string describing the type of the value.

Trait Implementations

impl Clone for Value
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Value
[src]

Formats the value using the given formatter.

impl NameDebug for Value
[src]

Writes the value's debug representation to the formatter stream.

impl NameDisplay for Value
[src]

Writes the value's display representation to the formatter stream.

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

Returns the borrowed value

impl FromValue for Value
[src]

Consumes the Value and returns a Rust value

impl From<()> for Value
[src]

Performs the conversion.

impl From<bool> for Value
[src]

Performs the conversion.

impl From<char> for Value
[src]

Performs the conversion.

impl From<Integer> for Value
[src]

Performs the conversion.

impl From<Ratio> for Value
[src]

Performs the conversion.

impl From<String> for Value
[src]

Performs the conversion.

impl From<Bytes> for Value
[src]

Performs the conversion.

impl From<PathBuf> for Value
[src]

Performs the conversion.

impl From<OsString> for Value
[src]

Performs the conversion.

impl From<f32> for Value
[src]

Performs the conversion.

impl From<f64> for Value
[src]

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

impl From<RcString> for Value
[src]

Performs the conversion.

impl<T: Into<Value>> From<Vec<T>> for Value
[src]

Performs the conversion.

impl<'a, T: Clone + Into<Value>> From<&'a [T]> for Value
[src]

Performs the conversion.

impl<'a, T: Clone + Into<Value>> From<&'a mut [T]> for Value
[src]

Performs the conversion.

impl From<RcVec<Value>> for Value
[src]

Performs the conversion.

impl From<i8> for Value
[src]

Performs the conversion.

impl From<i16> for Value
[src]

Performs the conversion.

impl From<i32> for Value
[src]

Performs the conversion.

impl From<i64> for Value
[src]

Performs the conversion.

impl From<isize> for Value
[src]

Performs the conversion.

impl From<u8> for Value
[src]

Performs the conversion.

impl From<u16> for Value
[src]

Performs the conversion.

impl From<u32> for Value
[src]

Performs the conversion.

impl From<u64> for Value
[src]

Performs the conversion.

impl From<usize> for Value
[src]

Performs the conversion.

impl<A: Into<Value>> From<(A,)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>> From<(A, B)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>, C: Into<Value>> From<(A, B, C)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>> From<(A, B, C, D)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>> From<(A, B, C, D, E)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>> From<(A, B, C, D, E, F)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>> From<(A, B, C, D, E, F, G)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>> From<(A, B, C, D, E, F, G, H)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>> From<(A, B, C, D, E, F, G, H, I)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>> From<(A, B, C, D, E, F, G, H, I, J)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>, K: Into<Value>> From<(A, B, C, D, E, F, G, H, I, J, K)> for Value
[src]

Performs the conversion.

impl<A: Into<Value>, B: Into<Value>, C: Into<Value>, D: Into<Value>, E: Into<Value>, F: Into<Value>, G: Into<Value>, H: Into<Value>, I: Into<Value>, J: Into<Value>, K: Into<Value>, L: Into<Value>> From<(A, B, C, D, E, F, G, H, I, J, K, L)> for Value
[src]

Performs the conversion.