Skip to main content

Heap

Struct Heap 

Source
pub struct Heap { /* private fields */ }

Implementations§

Source§

impl Heap

Source

pub fn scoped<R>(f: impl FnOnce(&Heap) -> R) -> R

Create a heap for a lexical scope.

Source

pub fn new() -> Self

Source

pub fn get(&self, pointer: &Pointer) -> Result<ValueRef, EngineError>

Source

pub fn type_name(&self, pointer: &Pointer) -> Result<&'static str, EngineError>

Source

pub fn pointer_as_bool(&self, pointer: &Pointer) -> Result<bool, EngineError>

Source

pub fn pointer_as_u8(&self, pointer: &Pointer) -> Result<u8, EngineError>

Source

pub fn pointer_as_u16(&self, pointer: &Pointer) -> Result<u16, EngineError>

Source

pub fn pointer_as_u32(&self, pointer: &Pointer) -> Result<u32, EngineError>

Source

pub fn pointer_as_u64(&self, pointer: &Pointer) -> Result<u64, EngineError>

Source

pub fn pointer_as_i8(&self, pointer: &Pointer) -> Result<i8, EngineError>

Source

pub fn pointer_as_i16(&self, pointer: &Pointer) -> Result<i16, EngineError>

Source

pub fn pointer_as_i32(&self, pointer: &Pointer) -> Result<i32, EngineError>

Source

pub fn pointer_as_i64(&self, pointer: &Pointer) -> Result<i64, EngineError>

Source

pub fn pointer_as_f32(&self, pointer: &Pointer) -> Result<f32, EngineError>

Source

pub fn pointer_as_f64(&self, pointer: &Pointer) -> Result<f64, EngineError>

Source

pub fn pointer_as_string( &self, pointer: &Pointer, ) -> Result<String, EngineError>

Source

pub fn pointer_as_uuid(&self, pointer: &Pointer) -> Result<Uuid, EngineError>

Source

pub fn pointer_as_datetime( &self, pointer: &Pointer, ) -> Result<DateTime<Utc>, EngineError>

Source

pub fn pointer_as_tuple( &self, pointer: &Pointer, ) -> Result<Vec<Pointer>, EngineError>

Source

pub fn pointer_as_array( &self, pointer: &Pointer, ) -> Result<Vec<Pointer>, EngineError>

Source

pub fn pointer_as_dict( &self, pointer: &Pointer, ) -> Result<BTreeMap<Symbol, Pointer>, EngineError>

Source

pub fn pointer_as_adt( &self, pointer: &Pointer, ) -> Result<(Symbol, Vec<Pointer>), EngineError>

Source

pub fn pointer_as_uninitialized( &self, pointer: &Pointer, ) -> Result<Symbol, EngineError>

Source

pub fn pointer_as_closure( &self, pointer: &Pointer, ) -> Result<Closure, EngineError>

Source

pub fn pointer_as_native( &self, pointer: &Pointer, ) -> Result<NativeFn, EngineError>

Source

pub fn pointer_as_overloaded( &self, pointer: &Pointer, ) -> Result<OverloadedFn, EngineError>

Source

pub fn alloc_bool(&self, value: bool) -> Result<Pointer, EngineError>

Source

pub fn alloc_u8(&self, value: u8) -> Result<Pointer, EngineError>

Source

pub fn alloc_u16(&self, value: u16) -> Result<Pointer, EngineError>

Source

pub fn alloc_u32(&self, value: u32) -> Result<Pointer, EngineError>

Source

pub fn alloc_u64(&self, value: u64) -> Result<Pointer, EngineError>

Source

pub fn alloc_i8(&self, value: i8) -> Result<Pointer, EngineError>

Source

pub fn alloc_i16(&self, value: i16) -> Result<Pointer, EngineError>

Source

pub fn alloc_i32(&self, value: i32) -> Result<Pointer, EngineError>

Source

pub fn alloc_i64(&self, value: i64) -> Result<Pointer, EngineError>

Source

pub fn alloc_f32(&self, value: f32) -> Result<Pointer, EngineError>

Source

pub fn alloc_f64(&self, value: f64) -> Result<Pointer, EngineError>

Source

pub fn alloc_string(&self, value: String) -> Result<Pointer, EngineError>

Source

pub fn alloc_uuid(&self, value: Uuid) -> Result<Pointer, EngineError>

Source

pub fn alloc_datetime( &self, value: DateTime<Utc>, ) -> Result<Pointer, EngineError>

Source

pub fn alloc_value(&self, value: Value) -> Result<Pointer, EngineError>

Source

pub fn alloc_tuple(&self, values: Vec<Pointer>) -> Result<Pointer, EngineError>

Source

pub fn alloc_array(&self, values: Vec<Pointer>) -> Result<Pointer, EngineError>

Source

pub fn alloc_dict( &self, values: BTreeMap<Symbol, Pointer>, ) -> Result<Pointer, EngineError>

Source

pub fn alloc_adt( &self, name: Symbol, args: Vec<Pointer>, ) -> Result<Pointer, EngineError>

Source

pub fn alloc_closure( &self, env: Env, param: Symbol, param_ty: Type, typ: Type, body: Arc<TypedExpr>, ) -> Result<Pointer, EngineError>

Source

pub fn alloc_overloaded( &self, name: Symbol, typ: Type, applied: Vec<Pointer>, applied_types: Vec<Type>, ) -> Result<Pointer, EngineError>

Trait Implementations§

Source§

impl Clone for Heap

Source§

fn clone(&self) -> Heap

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Heap

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Heap

§

impl RefUnwindSafe for Heap

§

impl Send for Heap

§

impl Sync for Heap

§

impl Unpin for Heap

§

impl UnsafeUnpin for Heap

§

impl UnwindSafe for Heap

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more