pub enum UpvalState {
Open {
slot: u32,
thread: Option<Gc<Coro>>,
},
Closed(Value),
}Expand description
Open / closed state of an upvalue cell.
Variants§
Open
references slot slot of thread’s value stack (None = the main
thread). The owning thread is tracked so the cell still resolves to the
right stack after a coroutine swap (P05).
Fields
Closed(Value)
Captured value has been hoisted into the cell.
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 moreimpl Copy for UpvalState
Auto Trait Implementations§
impl !RefUnwindSafe for UpvalState
impl !Send for UpvalState
impl !Sync for UpvalState
impl !UnwindSafe for UpvalState
impl Freeze for UpvalState
impl Unpin for UpvalState
impl UnsafeUnpin 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