pub struct ResizeManager { /* private fields */ }
Expand description
Resize manager for maplets
Implementations§
Source§impl ResizeManager
impl ResizeManager
Sourcepub fn calculate_new_capacity(&self, _current_load: usize) -> usize
pub fn calculate_new_capacity(&self, _current_load: usize) -> usize
Calculate new capacity for resizing
Sourcepub fn should_resize(&self, current_load: usize, max_load_factor: f64) -> bool
pub fn should_resize(&self, current_load: usize, max_load_factor: f64) -> bool
Check if resizing is needed
Sourcepub fn update_capacity(&mut self, new_capacity: usize)
pub fn update_capacity(&mut self, new_capacity: usize)
Update capacity after resize
Trait Implementations§
Source§impl Clone for ResizeManager
impl Clone for ResizeManager
Source§fn clone(&self) -> ResizeManager
fn clone(&self) -> ResizeManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ResizeManager
impl RefUnwindSafe for ResizeManager
impl Send for ResizeManager
impl Sync for ResizeManager
impl Unpin for ResizeManager
impl UnwindSafe for ResizeManager
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