pub enum RefTarget {
Cell(Gc<Cell>),
Property {
base: Value,
name: PropertyKey,
},
}Expand description
What a ObjectKind::Reference points at.
Variants§
Cell(Gc<Cell>)
A binding in a reference cell: a captured local, a closure variable, or a declared global.
Property
base[name], resolved through [[Get]]/[[Set]] when the value is read or stored.
A base of undefined is an unresolvable reference — a name that is on neither
the global binding table nor the global object. §6.2.5.5 makes reading one a
ReferenceError and writing one, in sloppy code, a new global property.
Fields
§
base: ValueThe object to read from or write to — normally the global object. undefined
marks an unresolvable reference.
§
name: PropertyKeyThe property key on that object.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RefTarget
impl !Send for RefTarget
impl !Sync for RefTarget
impl !UnwindSafe for RefTarget
impl Forget for RefTarget
impl Freeze for RefTargetwhere
*const GcBox<Cell> is !null: Freeze,
*const GcBox<JsString> is !null: Freeze,
*const GcBox<JsObject> is !null: Freeze,
*const GcBox<JsSymbol> is !null: Freeze,
*const GcBox<BigInt> is !null: Freeze,
*const RcInner<[u8]> is !null: Freeze,
PhantomData<RcInner<[u8]>>: Freeze,
*const RcInner<Vec<u8>> is !null: Freeze,
PhantomData<RcInner<Vec<u8>>>: Freeze,
impl Move for RefTarget
impl Unpin for RefTarget
impl UnsafeUnpin for RefTargetwhere
*const GcBox<Cell> is !null: UnsafeUnpin,
*const GcBox<JsString> is !null: UnsafeUnpin,
*const GcBox<JsObject> is !null: UnsafeUnpin,
*const GcBox<JsSymbol> is !null: UnsafeUnpin,
*const GcBox<BigInt> is !null: UnsafeUnpin,
*const RcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<RcInner<[u8]>>: UnsafeUnpin,
*const RcInner<Vec<u8>> is !null: UnsafeUnpin,
PhantomData<RcInner<Vec<u8>>>: UnsafeUnpin,
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