pub struct Flag<A> { /* private fields */ }Expand description
A Pool that can hold one scalar element of type ()
Implementations§
Trait Implementations§
Source§impl<A: ScalarAllocator<Scalar = ()>> Pool<A> for Flag<A>
impl<A: ScalarAllocator<Scalar = ()>> Pool<A> for Flag<A>
Source§fn insert(&self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn insert(&self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
Put a new id into the pool
Source§fn remove(&self) -> Option<OpaqueScalar<A>>
fn remove(&self) -> Option<OpaqueScalar<A>>
Take an id out of the pool
Source§impl<A: ScalarAllocator<Scalar = ()>> PoolMut<A> for Flag<A>
impl<A: ScalarAllocator<Scalar = ()>> PoolMut<A> for Flag<A>
Source§fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
Put a new id into the pool
Source§fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Take an id out of the pool
Auto Trait Implementations§
impl<A> !Freeze for Flag<A>
impl<A> RefUnwindSafe for Flag<A>where
A: RefUnwindSafe,
impl<A> Send for Flag<A>where
A: Send,
impl<A> Sync for Flag<A>where
A: Sync,
impl<A> Unpin for Flag<A>where
A: Unpin,
impl<A> UnwindSafe for Flag<A>where
A: UnwindSafe,
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