pub struct ValueAllocator<T>{ /* private fields */ }
Implementations§
Source§impl<T> ValueAllocator<T>
impl<T> ValueAllocator<T>
pub fn new(lowest: T, highest: T) -> Self
pub fn allocate(&mut self) -> Option<T>
pub fn first_vacant(&self) -> Option<T>
pub fn deallocate(&mut self, value: T)
pub fn use_value(&mut self, value: T) -> bool
pub fn is_used(&self, value: T) -> bool
pub fn clear(&mut self)
pub fn interval_count(&self) -> usize
pub fn dump(&self)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ValueAllocator<T>where
T: Freeze,
impl<T> RefUnwindSafe for ValueAllocator<T>where
T: RefUnwindSafe,
impl<T> Send for ValueAllocator<T>where
T: Send,
impl<T> Sync for ValueAllocator<T>where
T: Sync,
impl<T> Unpin for ValueAllocator<T>where
T: Unpin,
impl<T> UnwindSafe for ValueAllocator<T>where
T: UnwindSafe + RefUnwindSafe,
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