pub struct GuardPool(_);Expand description
A GuardPool is an “arena”-style storage area for FlatGuards.
Some invariants for the underlying vector:
GuardRefsare always within the same pool (obviously).- The underlyings numbers in
GuardRefs can only go “backward,” in the sense that they refer to smaller indices than the currentFlatGuard. - The first
FlatGuardis alwaysFlatGuard::True.
This could be used to do some interesting hash-consing/deduplication; it currently does the
weakest possible form of that: deduplicating True guards only.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GuardPool
impl !Send for GuardPool
impl !Sync for GuardPool
impl Unpin for GuardPool
impl !UnwindSafe for GuardPool
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