pub struct Slot {
pub kind: MKind,
pub hidden: bool,
pub state: SlotState,
pub value: Value,
pub compute: Option<Rc<Compute>>,
}Expand description
a member’s slot in an instance
Fields§
§kind: MKindthe member’s kind
x$ = e: computed, never part of the value (D34)
state: SlotStateits state
value: Valueits value, once forced
compute: Option<Rc<Compute>>Binding-time computation metadata. Shared snapshots are immutable;
use computation_mut for an isolated copy-on-write mutation.
Implementations§
Source§impl Slot
impl Slot
Sourcepub fn computation(&self) -> Option<&Compute>
pub fn computation(&self) -> Option<&Compute>
Inspect the descriptor captured when this slot was bound.
Sourcepub fn computation_snapshot(&self) -> Option<Rc<Compute>>
pub fn computation_snapshot(&self) -> Option<Rc<Compute>>
Retain an immutable descriptor snapshot, including its captured owners.
Sourcepub fn computation_mut(&mut self) -> Option<&mut Compute>
pub fn computation_mut(&mut self) -> Option<&mut Compute>
Mutate this slot’s descriptor without changing an outstanding snapshot. As with direct field replacement, this does not reset the slot state or invalidate retained queries; the caller still owns that policy.
Sourcepub fn set_computation(&mut self, compute: Option<Compute>)
pub fn set_computation(&mut self, compute: Option<Compute>)
Replace or remove captured metadata. This does not change state/value.
Auto Trait Implementations§
impl !RefUnwindSafe for Slot
impl !Send for Slot
impl !Sync for Slot
impl !UnwindSafe for Slot
impl Freeze for Slot
impl Unpin for Slot
impl UnsafeUnpin for Slot
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