pub struct MapBuilder { /* private fields */ }Implementations§
Source§impl MapBuilder
impl MapBuilder
pub fn new() -> Self
Sourcepub fn shards(self, shards: usize) -> Self
pub fn shards(self, shards: usize) -> Self
Set the number of shards
This will be rounded up to the next power of two, but by default it will be 4 times the number of cores since this is the number of possible parrallel operations
Sourcepub fn estimated_size(self, estimated_size: usize) -> Self
pub fn estimated_size(self, estimated_size: usize) -> Self
Set the estimated size of the map
Used to preallocate the map
pub fn build<K, V, S: BuildHasher>(self, build_hasher: S) -> LightMap<K, V, S>
Auto Trait Implementations§
impl Freeze for MapBuilder
impl RefUnwindSafe for MapBuilder
impl Send for MapBuilder
impl Sync for MapBuilder
impl Unpin for MapBuilder
impl UnsafeUnpin for MapBuilder
impl UnwindSafe for MapBuilder
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