pub struct FieldCache { /* private fields */ }Expand description
One validated property lookup.
Covers both own-property hits and prototype hits. The second kind was deliberately left
uncached at first (“a prototype hit depends on more than the object and the name”), and
that is true — but it is checkable. What it costs is array:push: a.push lives on
Array.prototype, so get_field2 push walked the chain and string-compared ~40 property
names on every iteration (measured: 100 ns per call over an empty loop).
Auto Trait Implementations§
impl !RefUnwindSafe for FieldCache
impl !Send for FieldCache
impl !Sync for FieldCache
impl !UnwindSafe for FieldCache
impl Forget for FieldCache
impl Freeze for FieldCache
impl Move for FieldCache
impl Unpin for FieldCache
impl UnsafeUnpin for FieldCachewhere
*const RcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<RcInner<[u8]>>: UnsafeUnpin,
*const RcInner<Vec<u8>> is !null: UnsafeUnpin,
PhantomData<RcInner<Vec<u8>>>: UnsafeUnpin,
*const GcBox<JsSymbol> is !null: UnsafeUnpin,
*const GcBox<JsObject> is !null: 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