[][src]Struct pui_core::pool::Sequence

pub struct Sequence<R, P: ?Sized> {
    pub index: R,
    pub pools: P,
}

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]

impl<A: ScalarAllocator, R: Radium<Item = usize>, P: PoolMut<A>> PoolMut<A> for Sequence<R, [P]>[src]

Auto Trait Implementations

impl<R, P: ?Sized> RefUnwindSafe for Sequence<R, P> where
    P: RefUnwindSafe,
    R: RefUnwindSafe
[src]

impl<R, P: ?Sized> Send for Sequence<R, P> where
    P: Send,
    R: Send
[src]

impl<R, P: ?Sized> Sync for Sequence<R, P> where
    P: Sync,
    R: Sync
[src]

impl<R, P: ?Sized> Unpin for Sequence<R, P> where
    P: Unpin,
    R: Unpin
[src]

impl<R, P: ?Sized> UnwindSafe for Sequence<R, P> where
    P: UnwindSafe,
    R: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.