[][src]Struct pui::runtime::Runtime

pub struct Runtime<I: IdAlloc = Global, P: PoolMut<I::Id> = ()> { /* fields omitted */ }

A runtime checked identifier

This uses a runtime id to verify it's identity, this id is provided by the [IdAlloc](IdAlloc) trait, and ids may be reused via PoolMut<_>

Implementations

impl Runtime[src]

pub fn new() -> Self[src]

Create a new Runtime using Global without reusing ids

impl<P: PoolMut<GlobalId>> Runtime<Global, P>[src]

pub fn with_pool(pool: P) -> Self[src]

Create a new Runtime using Global, reusing ids from the given pool

impl<I: IdAlloc> Runtime<I>[src]

pub fn with_id_alloc(id_alloc: &mut I) -> Self[src]

Create a new Runtime using the selected IdAlloc without reusing ids

pub fn try_with_id_alloc(id_alloc: &mut I) -> Option<Self>[src]

Try to create a new Runtime using the selected IdAlloc without reusing ids

impl<I: IdAlloc, P: PoolMut<I::Id>> Runtime<I, P>[src]

pub fn with_id_alloc_and_pool(id_alloc: &mut I, pool: P) -> Self[src]

Create a new Runtime using the selected IdAlloc reusing ids from the given pool. If the pool is empty it will aquire a new id from the IdAlloc

pub fn try_with_id_alloc_and_pool(id_alloc: &mut I, pool: P) -> Option<Self>[src]

Try to create a new Runtime using the selected IdAlloc reusing ids from the given pool. If the pool is empty it will attempt to aquire a new id from the IdAlloc

pub fn handle(&self) -> RuntimeHandle<I>[src]

A handle that this Runtime identifier owns

Trait Implementations

impl<I: IdAlloc, P: PoolMut<I::Id>> Debug for Runtime<I, P> where
    I::Id: Debug
[src]

impl<I: IdAlloc, P: PoolMut<I::Id>> Drop for Runtime<I, P>[src]

impl<I: IdAlloc, P: PoolMut<I::Id>> Eq for Runtime<I, P>[src]

impl<I: IdAlloc, P: PoolMut<I::Id>> Identifier for Runtime<I, P>[src]

type Handle = RuntimeHandle<I>

A handle which can be used to mark other types

impl<I: IdAlloc, P: PoolMut<I::Id>> PartialEq<Runtime<I, P>> for Runtime<I, P>[src]

Auto Trait Implementations

impl<I, P> RefUnwindSafe for Runtime<I, P> where
    P: RefUnwindSafe,
    <I as IdAlloc>::Id: RefUnwindSafe
[src]

impl<I, P> Send for Runtime<I, P> where
    P: Send,
    <I as IdAlloc>::Id: Send
[src]

impl<I, P> Sync for Runtime<I, P> where
    P: Sync,
    <I as IdAlloc>::Id: Sync
[src]

impl<I, P> Unpin for Runtime<I, P> where
    P: Unpin,
    <I as IdAlloc>::Id: Unpin
[src]

impl<I, P> UnwindSafe for Runtime<I, P> where
    P: UnwindSafe,
    <I as IdAlloc>::Id: 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.