[][src]Macro pui_core::global_pool

macro_rules! global_pool {
    (
        $(#[$meta:meta])*
        $v:vis struct $name:ident($imp:ty);
    ) => { ... };
    (
        $(#[$meta:meta])*
        $v:vis thread_local struct $name:ident($imp:ty);
    ) => { ... };
}

Create a new type that implements Pool and PoolMut that can be used with Dynamic

For example,

pui_core::global_pool! {
    pub struct MyPool(pui_core::pool::SyncStackPool<pui_core::dynamic::Global>);
}

let _my_pool = MyPool;

will generate a global pool that is backed by a SyncStackPool, and holds Globals