Struct solana_bucket_map::bucket::Reallocated
source · pub struct Reallocated<I: BucketOccupied, D: BucketOccupied> {
pub active_reallocations: AtomicUsize,
pub items: Mutex<ReallocatedItems<I, D>>,
}
Fields§
§active_reallocations: AtomicUsize
0 if reallocations are encoded
items: Mutex<ReallocatedItems<I, D>>
actual reallocated bucket mutex because bucket grow code runs with a read lock
Implementations§
source§impl<I: BucketOccupied, D: BucketOccupied> Reallocated<I, D>
impl<I: BucketOccupied, D: BucketOccupied> Reallocated<I, D>
sourcepub fn add_reallocation(&self)
pub fn add_reallocation(&self)
specify that a reallocation has occurred
sourcepub fn get_reallocated(&self) -> bool
pub fn get_reallocated(&self) -> bool
Return true IFF a reallocation has occurred. Calling this takes conceptual ownership of the reallocation encoded in the struct.
Trait Implementations§
source§impl<I: BucketOccupied, D: BucketOccupied> Default for Reallocated<I, D>
impl<I: BucketOccupied, D: BucketOccupied> Default for Reallocated<I, D>
Auto Trait Implementations§
impl<I, D> RefUnwindSafe for Reallocated<I, D>
impl<I, D> Send for Reallocated<I, D>where D: Send, I: Send,
impl<I, D> Sync for Reallocated<I, D>where D: Send, I: Send,
impl<I, D> Unpin for Reallocated<I, D>where D: Unpin, I: Unpin,
impl<I, D> UnwindSafe for Reallocated<I, D>
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