[−][src]Struct pui_core::pool::Sequence
A Pool
that iterates over it's elements and tries to put a given
OpaqueScalar
into one of it's sub-pools. May fail if it can't put
an element into any of it's pools
i.e.
let sequence = Sequence { index: Cell::new(0), pools: [Cell::new(None), Cell::new(None), Cell::new(None), Cell::new(None)], }; let sequence: &Sequence<Cell<usize>, [Cell<Option<OpaqueScalar<_>>>]> = &sequence; let dynamic = ThreadLocal::with_pool(sequence);
Fields
index: R
The index must be either Cell<usize>
or AtomicUsize
pools: P
The pools must have the type [P]
where P
is a pool
This type is generic, so that it's possible to create it with safe code
Trait Implementations
impl<A: ScalarAllocator, R: Radium<Item = usize>, P: Pool<A>> Pool<A> for Sequence<R, [P]>
[src]
pub fn insert(&self, mut scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
[src]
pub fn remove(&self) -> Option<OpaqueScalar<A>>
[src]
impl<A: ScalarAllocator, R: Radium<Item = usize>, P: PoolMut<A>> PoolMut<A> for Sequence<R, [P]>
[src]
pub fn insert_mut(
&mut self,
mut scalar: OpaqueScalar<A>
) -> Option<OpaqueScalar<A>>
[src]
&mut self,
mut scalar: OpaqueScalar<A>
) -> Option<OpaqueScalar<A>>
pub fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
[src]
Auto Trait Implementations
impl<R, P: ?Sized> RefUnwindSafe for Sequence<R, P> where
P: RefUnwindSafe,
R: RefUnwindSafe,
[src]
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, P: ?Sized> Send for Sequence<R, P> where
P: Send,
R: Send,
[src]
P: Send,
R: Send,
impl<R, P: ?Sized> Sync for Sequence<R, P> where
P: Sync,
R: Sync,
[src]
P: Sync,
R: Sync,
impl<R, P: ?Sized> Unpin for Sequence<R, P> where
P: Unpin,
R: Unpin,
[src]
P: Unpin,
R: Unpin,
impl<R, P: ?Sized> UnwindSafe for Sequence<R, P> where
P: UnwindSafe,
R: UnwindSafe,
[src]
P: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,