pub enum Value {
Show 22 variants
Bool(bool),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
F32(f32),
F64(f64),
String(String),
Uuid(Uuid),
DateTime(DateTime<Utc>),
Tuple(Vec<Pointer>),
Array(Vec<Pointer>),
Dict(BTreeMap<Symbol, Pointer>),
Adt(Symbol, Vec<Pointer>),
Uninitialized(Symbol),
Closure(Closure),
Native(NativeFn),
Overloaded(OverloadedFn),
}Variants§
Bool(bool)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
F32(f32)
F64(f64)
String(String)
Uuid(Uuid)
DateTime(DateTime<Utc>)
Tuple(Vec<Pointer>)
Array(Vec<Pointer>)
Dict(BTreeMap<Symbol, Pointer>)
Adt(Symbol, Vec<Pointer>)
Uninitialized(Symbol)
Closure(Closure)
Native(NativeFn)
Overloaded(OverloadedFn)
Implementations§
Source§impl Value
impl Value
pub fn value_type_name(&self) -> &'static str
pub fn value_as_bool(&self) -> Result<bool, EngineError>
pub fn value_as_u8(&self) -> Result<u8, EngineError>
pub fn value_as_u16(&self) -> Result<u16, EngineError>
pub fn value_as_u32(&self) -> Result<u32, EngineError>
pub fn value_as_u64(&self) -> Result<u64, EngineError>
pub fn value_as_i8(&self) -> Result<i8, EngineError>
pub fn value_as_i16(&self) -> Result<i16, EngineError>
pub fn value_as_i32(&self) -> Result<i32, EngineError>
pub fn value_as_i64(&self) -> Result<i64, EngineError>
pub fn value_as_f32(&self) -> Result<f32, EngineError>
pub fn value_as_f64(&self) -> Result<f64, EngineError>
pub fn value_as_string(&self) -> Result<String, EngineError>
pub fn value_as_uuid(&self) -> Result<Uuid, EngineError>
pub fn value_as_datetime(&self) -> Result<DateTime<Utc>, EngineError>
pub fn value_as_tuple(&self) -> Result<Vec<Pointer>, EngineError>
pub fn value_as_array(&self) -> Result<Vec<Pointer>, EngineError>
pub fn value_as_dict(&self) -> Result<BTreeMap<Symbol, Pointer>, EngineError>
pub fn value_as_adt(&self) -> Result<(Symbol, Vec<Pointer>), EngineError>
pub fn value_as_uninitialized(&self) -> Result<Symbol, EngineError>
pub fn value_as_closure(&self) -> Result<Closure, EngineError>
pub fn value_as_native(&self) -> Result<NativeFn, EngineError>
pub fn value_as_overloaded(&self) -> Result<OverloadedFn, EngineError>
Trait Implementations§
Source§impl FromPointer for Value
impl FromPointer for Value
fn from_pointer(heap: &Heap, pointer: &Pointer) -> Result<Value, EngineError>
Source§impl IntoPointer for &Value
impl IntoPointer for &Value
fn into_pointer(self, heap: &Heap) -> Result<Pointer, EngineError>
Source§impl IntoPointer for Value
impl IntoPointer for Value
fn into_pointer(self, heap: &Heap) -> Result<Pointer, EngineError>
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin 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