pub(super) struct Storage<T: Clone> {
    flags: Vec<u8>,
    vals: Vec<T>,
    capacity: usize,
    live_objects: usize,
    sticky_objects: usize,
    grow_factor: f64,
}Fields§
§flags: Vec<u8>§vals: Vec<T>§capacity: usize§live_objects: usize§sticky_objects: usize§grow_factor: f64Implementations§
Source§impl<T: Clone> Storage<T>
 
impl<T: Clone> Storage<T>
pub fn with_capacity(capacity: usize) -> Self
pub fn get(&self, idx: usize) -> Option<&T>
pub fn get_mut(&mut self, idx: usize) -> Option<&mut T>
pub fn set_grow_factor(&mut self, grow_factor: f64)
pub fn capacity(&self) -> usize
pub fn live_objects(&self) -> usize
pub fn alloc(&mut self, obj: T, flags: u8) -> u32
pub fn clear_marks(&mut self)
Sourcepub fn is_mutable(&self, idx: usize) -> bool
 
pub fn is_mutable(&self, idx: usize) -> bool
Is the object at index mutable.
pub fn mark(&mut self, idx: usize)
pub fn is_traced_and_set(&mut self, idx: usize) -> bool
pub fn sticky(&mut self, idx: usize)
pub fn unsticky(&mut self, idx: usize)
Sourcepub fn set_all_dead(&mut self, val: T)
 
pub fn set_all_dead(&mut self, val: T)
For any dead, live bit not set, objects in heap set them to val.
pub fn trace_all_live<FN: FnMut(&T)>(&mut self, trace: FN)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Storage<T>
impl<T> RefUnwindSafe for Storage<T>where
    T: RefUnwindSafe,
impl<T> Send for Storage<T>where
    T: Send,
impl<T> Sync for Storage<T>where
    T: Sync,
impl<T> Unpin for Storage<T>where
    T: Unpin,
impl<T> UnwindSafe for Storage<T>where
    T: 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