pub enum Value {
Show 16 variants
Null,
Boolean(bool),
Number(Number),
Character(char),
String(String),
Symbol(String),
Pair(Gc<Value>, Gc<Value>),
Vector(Vec<Gc<Value>>),
ByteVector(Vec<u8>),
Syntax(Syntax),
Procedure(Procedure),
ExternalFn(ExternalFn),
Future(Shared<BoxFuture<'static, Result<Vec<Gc<Value>>, RuntimeError>>>),
Transformer(Transformer),
Continuation(Option<Arc<Continuation>>),
Undefined,
}
Variants§
Null
Boolean(bool)
Number(Number)
Character(char)
String(String)
Symbol(String)
Pair(Gc<Value>, Gc<Value>)
Vector(Vec<Gc<Value>>)
ByteVector(Vec<u8>)
Syntax(Syntax)
Procedure(Procedure)
ExternalFn(ExternalFn)
Future(Shared<BoxFuture<'static, Result<Vec<Gc<Value>>, RuntimeError>>>)
Transformer(Transformer)
Continuation(Option<Arc<Continuation>>)
Undefined
Implementations§
Source§impl Value
impl Value
pub fn is_callable(&self) -> bool
pub fn is_variable_transformer(&self) -> bool
pub fn as_callable(&self) -> Option<Box<dyn Callable>>
pub fn fmt(&self) -> BoxFuture<'_, String>
pub fn from_literal(literal: &Literal) -> Self
pub fn from_syntax(syntax: &Syntax) -> Self
pub fn type_name(&self) -> &'static str
pub async fn eqv(&self, other: &Self) -> bool
Trait Implementations§
Source§impl Eval for Value
impl Eval for Value
fn eval<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_env: &'life1 Env,
_cont: &'life2 Option<Arc<Continuation>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Gc<Value>>, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn tail_eval<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
env: &'life1 Env,
cont: &'life2 Option<Arc<Continuation>>,
) -> Pin<Box<dyn Future<Output = Result<ValuesOrPreparedCall, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn tail_eval<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
env: &'life1 Env,
cont: &'life2 Option<Arc<Continuation>>,
) -> Pin<Box<dyn Future<Output = Result<ValuesOrPreparedCall, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Evaluate the expression in a tail environment
Source§impl From<ExternalFn> for Value
impl From<ExternalFn> for Value
Source§fn from(ef: ExternalFn) -> Self
fn from(ef: ExternalFn) -> Self
Converts to this type from the input type.
Source§impl Trace for Value
impl Trace for Value
Source§unsafe fn visit_children(&self, visitor: fn(OpaqueGcPtr))
unsafe fn visit_children(&self, visitor: fn(OpaqueGcPtr))
Safety Read more
Auto Trait Implementations§
impl Freeze for Value
impl !RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl !UnwindSafe for Value
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.