pub struct DataStack { /* private fields */ }
Implementations§
Source§impl DataStack
impl DataStack
pub fn new(capacity: usize, mode: DataStackMode) -> Self
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: Finalize + Sized + 'static>(&mut self, value: T) -> bool
Sourcepub unsafe fn push_raw(
&mut self,
layout: Layout,
type_hash: TypeHash,
finalizer: unsafe fn(_: *mut ()),
data: &[u8],
) -> bool
pub unsafe fn push_raw( &mut self, layout: Layout, type_hash: TypeHash, finalizer: unsafe fn(_: *mut ()), data: &[u8], ) -> bool
§Safety
pub fn push_register<T: Finalize + 'static>(&mut self) -> Option<usize>
pub fn push_register_value<T: Finalize + 'static>( &mut self, value: T, ) -> Option<usize>
Sourcepub unsafe fn push_register_raw(
&mut self,
type_hash: TypeHash,
value_layout: Layout,
) -> Option<usize>
pub unsafe fn push_register_raw( &mut self, type_hash: TypeHash, value_layout: Layout, ) -> Option<usize>
§Safety
pub fn push_stack(&mut self, other: Self) -> Result<(), Self>
pub fn push_from_register( &mut self, register: &mut DataStackRegisterAccess<'_>, ) -> bool
pub fn pop<T: Sized + 'static>(&mut self) -> Option<T>
Sourcepub unsafe fn pop_raw(
&mut self,
) -> Option<(Layout, TypeHash, unsafe fn(_: *mut ()), Vec<u8>)>
pub unsafe fn pop_raw( &mut self, ) -> Option<(Layout, TypeHash, unsafe fn(_: *mut ()), Vec<u8>)>
§Safety
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>) -> Self
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<'_>)>
Sourcepub unsafe fn prevent_drop(&mut self)
pub unsafe fn prevent_drop(&mut self)
§Safety
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataStack
impl RefUnwindSafe for DataStack
impl Send for DataStack
impl Sync for DataStack
impl Unpin for DataStack
impl UnwindSafe for DataStack
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