pub struct StackState {
pub resources: Vec<(Value, Value)>,
pub async_form: bool,
pub disposed: bool,
}Expand description
The resources a stack still holds, plus whether it is the async kind.
Cloned out of the object on every access because the interpreter may reallocate the object table while a method runs; the authoritative copy is written back afterwards.
Fields§
§resources: Vec<(Value, Value)>(resource, dispose method) pairs, in the order they were pushed.
async_form: boolWhether this is an AsyncDisposableStack.
disposed: boolWhether dispose has already run, which makes it a no-op and use a TypeError.
Implementations§
Source§impl StackState
impl StackState
Sourcepub fn new(async_form: bool) -> StackState
pub fn new(async_form: bool) -> StackState
An empty stack of the given kind.
Trait Implementations§
Source§impl Clone for StackState
impl Clone for StackState
Auto Trait Implementations§
impl !RefUnwindSafe for StackState
impl !Send for StackState
impl !Sync for StackState
impl !UnwindSafe for StackState
impl Forget for StackState
impl Freeze for StackState
impl Move for StackState
impl Unpin for StackState
impl UnsafeUnpin for StackState
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