[][src]Struct mini_kanren::core::value::Value

pub struct Value(_);

Dynamic value

Implementations

impl Value[src]

pub fn new(val: impl Into<Value>) -> Self[src]

Construct a new value

pub fn from_arc<T: Structure>(x: Arc<T>) -> Self[src]

Construct pre-Arc'd value

pub fn var(v: Var) -> Self[src]

Construct a value representing a variable

pub fn rv(i: usize) -> Self[src]

Construct a value representing a reified variable

pub fn cons(car: impl Into<Value>, cdr: impl Into<Value>) -> Self[src]

Construct a pair from two values

pub fn try_as_var(&self) -> Option<Var>[src]

Cast to Var if the value represents a variable

pub fn downcast_ref<T: 'static>(&self) -> Option<&T>[src]

Try to cast to concrete type

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

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

impl<T: Structure> From<T> for Value[src]

impl From<Vec<Value, Global>> for Value[src]

pub fn from(items: Vec<Value>) -> Self[src]

Convert Vec<Value> into a linked list of values.

impl<T: 'static + Atomic + PartialEq> PartialEq<T> for Value[src]

impl PartialEq<Value> for Value[src]

impl PartialEq<Var> for Value[src]

Auto Trait Implementations

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.