Struct crossbeam_epoch::internal::Bag
source · pub(crate) struct Bag {
deferreds: [Deferred; 64],
len: usize,
}
Expand description
A bag of deferred functions.
Fields§
§deferreds: [Deferred; 64]
Stashed objects.
len: usize
Implementations§
source§impl Bag
impl Bag
sourcepub(crate) unsafe fn try_push(
&mut self,
deferred: Deferred
) -> Result<(), Deferred>
pub(crate) unsafe fn try_push( &mut self, deferred: Deferred ) -> Result<(), Deferred>
Attempts to insert a deferred function into the bag.
Returns Ok(())
if successful, and Err(deferred)
for the given deferred
if the bag is
full.
Safety
It should be safe for another thread to execute the given function.
Trait Implementations§
impl Send for Bag
Bag::try_push()
requires that it is safe for another thread to execute the given functions.
Auto Trait Implementations§
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