Struct Stack

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

Implementations§

Source§

impl Stack

Source

pub fn make_null() -> SafeRc<dyn StackValue>

Source

pub fn make_nan() -> SafeRc<dyn StackValue>

Source

pub fn new(capacity: Option<usize>) -> Self

Source

pub fn take_items(&mut self) -> Vec<SafeRc<dyn StackValue>>

Source

pub fn set_items(&mut self, items: Vec<SafeRc<dyn StackValue>>)

Source

pub fn depth(&self) -> usize

Source

pub fn atoms(&self) -> &Atoms

Source

pub fn atoms_mut(&mut self) -> &mut Atoms

Source

pub fn check_underflow(&self, n: usize) -> Result<()>

Source

pub fn fetch(&self, idx: usize) -> Result<SafeRc<dyn StackValue>>

Source

pub fn swap(&mut self, lhs: usize, rhs: usize) -> Result<()>

Source

pub fn push<T: StackValue + 'static>(&mut self, item: T) -> Result<()>

Source

pub fn push_raw(&mut self, item: SafeRc<dyn StackValue>) -> Result<()>

Source

pub fn extend_raw<T>(&mut self, items: T) -> Result<()>
where T: IntoIterator, T::Item: Into<SafeRc<dyn StackValue>>,

Source

pub fn push_null(&mut self) -> Result<()>

Source

pub fn push_bool(&mut self, value: bool) -> Result<()>

Source

pub fn push_opt<T: StackValue + 'static>( &mut self, value: Option<T>, ) -> Result<()>

Source

pub fn push_opt_raw<T: StackValue + 'static>( &mut self, value: Option<SafeRc<T>>, ) -> Result<()>

Source

pub fn push_int<T: Into<BigInt>>(&mut self, value: T) -> Result<()>

Source

pub fn push_argcount(&mut self, args: u32) -> Result<()>

Source

pub fn pop(&mut self) -> Result<SafeRc<dyn StackValue>>

Source

pub fn pop_bool(&mut self) -> Result<bool>

Source

pub fn pop_smallint_range(&mut self, min: u32, max: u32) -> Result<u32>

Source

pub fn pop_smallint_signed_range(&mut self, min: i32, max: i32) -> Result<i32>

Source

pub fn pop_long_range(&mut self, min: u64, max: u64) -> Result<u64>

Source

pub fn pop_usize(&mut self) -> Result<usize>

Source

pub fn pop_smallint_char(&mut self) -> Result<char>

Source

pub fn pop_int(&mut self) -> Result<SafeRc<BigInt>>

Source

pub fn pop_string(&mut self) -> Result<SafeRc<String>>

Source

pub fn pop_string_owned(&mut self) -> Result<String>

Source

pub fn pop_bytes(&mut self) -> Result<SafeRc<Vec<u8>>>

Source

pub fn pop_bytes_owned(&mut self) -> Result<Vec<u8>>

Source

pub fn pop_cell(&mut self) -> Result<SafeRc<Cell>>

Source

pub fn pop_builder(&mut self) -> Result<SafeRc<CellBuilder>>

Source

pub fn pop_builder_owned(&mut self) -> Result<CellBuilder>

Source

pub fn pop_cell_slice(&mut self) -> Result<SafeRc<OwnedCellSlice>>

Source

pub fn pop_cont(&mut self) -> Result<RcFiftCont>

Source

pub fn pop_word_list(&mut self) -> Result<SafeRc<WordList>>

Source

pub fn pop_tuple(&mut self) -> Result<SafeRc<StackTuple>>

Source

pub fn pop_tuple_owned(&mut self) -> Result<StackTuple>

Source

pub fn pop_shared_box(&mut self) -> Result<SafeRc<SharedBox>>

Source

pub fn pop_atom(&mut self) -> Result<SafeRc<Atom>>

Source

pub fn pop_hashmap(&mut self) -> Result<Option<SafeRc<HashMapTreeNode>>>

Source

pub fn items(&self) -> &[SafeRc<dyn StackValue>]

Source

pub fn clear(&mut self)

Source

pub fn display_dump(&self) -> impl Display + '_

Source

pub fn display_list(&self) -> impl Display + '_

Auto Trait Implementations§

§

impl Freeze for Stack

§

impl !RefUnwindSafe for Stack

§

impl !Send for Stack

§

impl !Sync for Stack

§

impl Unpin for Stack

§

impl !UnwindSafe for Stack

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> 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> SafeDelete for T
where T: 'static,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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
Source§

impl<T> EquivalentRepr<T> for T