pub struct DataStack { /* private fields */ }

Implementations§

§

impl DataStack

pub fn new(capacity: usize, mode: DataStackMode) -> DataStack

pub fn position(&self) -> usize

pub fn size(&self) -> usize

pub fn available(&self) -> usize

pub fn as_bytes(&self) -> &[u8]

pub fn visit(&self, f: impl FnMut(TypeHash, Layout, &[u8], Range<usize>, bool))

pub fn push<T>(&mut self, value: T) -> boolwhere T: Finalize + 'static,

pub unsafe fn push_raw( &mut self, layout: Layout, type_hash: TypeHash, finalizer: unsafe fn(_: *mut ()), data: &[u8] ) -> bool

pub fn push_register<T>(&mut self) -> Option<usize>where T: Finalize + 'static,

pub fn push_register_value<T>(&mut self, value: T) -> Option<usize>where T: Finalize + 'static,

pub unsafe fn push_register_raw( &mut self, type_hash: TypeHash, value_layout: Layout ) -> Option<usize>

pub fn push_stack(&mut self, other: DataStack) -> Result<(), DataStack>

pub fn push_from_register( &mut self, register: &mut DataStackRegisterAccess<'_> ) -> bool

pub fn pop<T>(&mut self) -> Option<T>where T: 'static,

pub unsafe fn pop_raw( &mut self ) -> Option<(Layout, TypeHash, unsafe fn(_: *mut ()), Vec<u8, Global>)>

pub fn drop(&mut self) -> bool

pub fn drop_register(&mut self) -> bool

pub fn pop_stack( &mut self, data_count: usize, capacity: Option<usize> ) -> DataStack

pub fn pop_to_register( &mut self, register: &mut DataStackRegisterAccess<'_> ) -> bool

pub fn store(&self) -> DataStackToken

pub fn restore(&mut self, token: DataStackToken)

pub fn reverse(&mut self, token: DataStackToken)

pub fn peek(&self) -> Option<TypeHash>

pub fn registers_count(&self) -> usize

pub fn access_register( &mut self, index: usize ) -> Option<DataStackRegisterAccess<'_>>

pub fn access_registers_pair( &mut self, a: usize, b: usize ) -> Option<(DataStackRegisterAccess<'_>, DataStackRegisterAccess<'_>)>

pub unsafe fn prevent_drop(&mut self)

Trait Implementations§

§

impl Drop for DataStack

§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Finalize for T

§

unsafe fn finalize_raw(data: *mut ())

Safety Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Component for Twhere T: Send + Sync + 'static,