pub struct Stack { /* private fields */ }
Implementations§
source§impl Stack
impl Stack
pub fn new() -> Stack
pub fn set_max_stack_size(&mut self, max_stack_size: VmIndex)
pub fn pop(&mut self) -> Value
pub fn pop_value<'s>(&'s mut self) -> PopValue<'s>
pub fn pop_many(&mut self, count: VmIndex)
pub fn clear(&mut self)
pub fn slide(&mut self, count: VmIndex)
pub fn push<T>(&mut self, v: T)where
T: StackPrimitive,
pub fn last(&self) -> Option<Variants<'_>>
pub fn get_variant(&self, index: VmIndex) -> Option<Variants<'_>>
pub fn remove_range(&mut self, from: VmIndex, to: VmIndex)
pub fn len(&self) -> VmIndex
pub fn get_values(&self) -> &[Value]
pub fn get_frames(&self) -> &[Frame<State>]
pub fn get_frames_mut(&mut self) -> &mut [Frame<State>]
pub fn current_frame<S>(&mut self) -> StackFrame<'_, S>where
S: StackState,
sourcepub fn release_lock(&mut self, lock: Lock)
pub fn release_lock(&mut self, lock: Lock)
Release a lock on the stack.
Panics if the lock is not the top-most lock
sourcepub fn stacktrace(&self, frame_level: usize) -> Stacktrace
pub fn stacktrace(&self, frame_level: usize) -> Stacktrace
Creates a stackrace starting from frame_level
Trait Implementations§
source§impl<'de, 'gc> DeserializeState<'de, DeSeed<'gc>> for Stack
impl<'de, 'gc> DeserializeState<'de, DeSeed<'gc>> for Stack
source§fn deserialize_state<__D>(
__seed: &mut DeSeed<'gc>,
__deserializer: __D
) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize_state<__D>(
__seed: &mut DeSeed<'gc>,
__deserializer: __D
) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserializes
Self
using seed
and the deserializer
source§impl<'c, T> Extend<&'c T> for Stackwhere
T: StackPrimitive + 'c,
impl<'c, T> Extend<&'c T> for Stackwhere
T: StackPrimitive + 'c,
source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = &'c T>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = &'c T>,
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl SerializeState<SeSeed> for Stack
impl SerializeState<SeSeed> for Stack
source§fn serialize_state<__S>(
&self,
__serializer: __S,
__seed: &SeSeed
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
fn serialize_state<__S>(
&self,
__serializer: __S,
__seed: &SeSeed
) -> Result<__S::Ok, __S::Error>where
__S: Serializer,
Serializes
self
Auto Trait Implementations§
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> 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
§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.