pub struct EntropyMapLookup { /* private fields */ }Expand description
Wrapper around entropy-map’s MapWithDict for u32 -> u8 lookups
Implementations§
Source§impl EntropyMapLookup
impl EntropyMapLookup
Sourcepub fn new(entries: &[(u32, u8)]) -> (Self, u64)
pub fn new(entries: &[(u32, u8)]) -> (Self, u64)
Create a new entropy map from key-value pairs Returns the map and construction time in nanoseconds
Sourcepub fn lookup_batch(&self, keys: &[u32], results: &mut [u8])
pub fn lookup_batch(&self, keys: &[u32], results: &mut [u8])
Lookup multiple values at once
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get memory usage information
Auto Trait Implementations§
impl Freeze for EntropyMapLookup
impl RefUnwindSafe for EntropyMapLookup
impl Send for EntropyMapLookup
impl Sync for EntropyMapLookup
impl Unpin for EntropyMapLookup
impl UnsafeUnpin for EntropyMapLookup
impl UnwindSafe for EntropyMapLookup
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