Struct casper_execution_engine::core::runtime::stack::RuntimeStack
source · pub struct RuntimeStack { /* private fields */ }
Expand description
The runtime stack.
Implementations§
source§impl RuntimeStack
impl RuntimeStack
sourcepub fn new_with_frame(max_height: usize, frame: RuntimeStackFrame) -> Self
pub fn new_with_frame(max_height: usize, frame: RuntimeStackFrame) -> Self
Creates a stack with one entry.
sourcepub fn current_frame(&self) -> Option<&RuntimeStackFrame>
pub fn current_frame(&self) -> Option<&RuntimeStackFrame>
The current stack frame.
sourcepub fn previous_frame(&self) -> Option<&RuntimeStackFrame>
pub fn previous_frame(&self) -> Option<&RuntimeStackFrame>
The previous stack frame.
sourcepub fn first_frame(&self) -> Option<&RuntimeStackFrame>
pub fn first_frame(&self) -> Option<&RuntimeStackFrame>
The first stack frame.
sourcepub fn push(
&mut self,
frame: RuntimeStackFrame
) -> Result<(), RuntimeStackOverflow>
pub fn push( &mut self, frame: RuntimeStackFrame ) -> Result<(), RuntimeStackOverflow>
Pushes a frame onto the stack.
sourcepub fn call_stack_elements(&self) -> &Vec<CallStackElement>
pub fn call_stack_elements(&self) -> &Vec<CallStackElement>
A view of the stack in the previous stack format.
sourcepub fn from_account_hash(account_hash: AccountHash, max_height: usize) -> Self
pub fn from_account_hash(account_hash: AccountHash, max_height: usize) -> Self
Returns a stack with exactly one session element with the associated account hash.
Trait Implementations§
source§impl Clone for RuntimeStack
impl Clone for RuntimeStack
source§fn clone(&self) -> RuntimeStack
fn clone(&self) -> RuntimeStack
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for RuntimeStack
impl Send for RuntimeStack
impl Sync for RuntimeStack
impl Unpin for RuntimeStack
impl UnwindSafe for RuntimeStack
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<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.