pub struct LazyPropMap<V>(Option<Box<PropMap<V>>>);Expand description
空のうちは確保しない PropMap(8 バイト)。
【2026-10-19】Obj は props/accessors/attrs の 3 つの IndexMap(各 56 バイト)を
持ち 256 バイトあった。getter/setter と属性はほとんどのオブジェクトで空なので、
中身ができたときだけ確保する。YouTube の kevlar_base(10.8MB)の実行で
512MB のヒープを使い切っていた。
Tuple Fields§
§0: Option<Box<PropMap<V>>>Implementations§
Source§impl<V> LazyPropMap<V>
impl<V> LazyPropMap<V>
fn map_mut(&mut self) -> &mut PropMap<V>
pub fn get(&self, k: &str) -> Option<&V>
pub fn get_mut(&mut self, k: &str) -> Option<&mut V>
pub fn contains_key(&self, k: &str) -> bool
pub fn insert(&mut self, k: String, v: V) -> Option<V>
pub fn entry(&mut self, k: String) -> Entry<'_, String, V>
pub fn shift_remove(&mut self, k: &str) -> Option<V>
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn keys(&self) -> impl Iterator<Item = &String>
pub fn iter(&self) -> impl Iterator<Item = (&String, &V)>
Trait Implementations§
Source§impl<V: Clone> Clone for LazyPropMap<V>
impl<V: Clone> Clone for LazyPropMap<V>
Source§impl<V> Default for LazyPropMap<V>
impl<V> Default for LazyPropMap<V>
Source§impl<V> IntoIterator for LazyPropMap<V>
impl<V> IntoIterator for LazyPropMap<V>
Source§impl<'a, V> IntoIterator for &'a LazyPropMap<V>
impl<'a, V> IntoIterator for &'a LazyPropMap<V>
Auto Trait Implementations§
impl<V> Freeze for LazyPropMap<V>
impl<V> RefUnwindSafe for LazyPropMap<V>where
V: RefUnwindSafe,
impl<V> Send for LazyPropMap<V>where
V: Send,
impl<V> Sync for LazyPropMap<V>where
V: Sync,
impl<V> Unpin for LazyPropMap<V>
impl<V> UnsafeUnpin for LazyPropMap<V>
impl<V> UnwindSafe for LazyPropMap<V>where
V: UnwindSafe,
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