pub enum UpValState {
Open {
thread_id: usize,
idx: StackIdx,
},
Closed(LuaValue),
}Expand description
Discriminator state for an upvalue: either still pointing at a thread’s stack slot, or owning the value after close.
Retained as the public read-side enum for out-of-crate consumers that
pattern-match through UpVal::slot(). The canonical storage on UpVal
is now a Cell-tagged shape; the RefCell<UpValState> mirror is
updated in lockstep so existing slot() callers keep working.
Variants§
Trait Implementations§
Source§impl Clone for UpValState
impl Clone for UpValState
Source§fn clone(&self) -> UpValState
fn clone(&self) -> UpValState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Freeze for UpValState
impl !RefUnwindSafe for UpValState
impl !Send for UpValState
impl !Sync for UpValState
impl Unpin for UpValState
impl UnsafeUnpin for UpValState
impl !UnwindSafe for UpValState
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