pub struct GuardPool(_);
Expand description
A GuardPool
is an “arena”-style storage area for FlatGuard
s.
Some invariants for the underlying vector:
GuardRefs
are always within the same pool (obviously).- The underlyings numbers in
GuardRef
s can only go “backward,” in the sense that they refer to smaller indices than the currentFlatGuard
. - The first
FlatGuard
is 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more