pub struct Dynamic<A: ScalarAllocator = Global, P: PoolMut<A> = ()> { /* private fields */ }
Expand description
A dynamically created type that is guarnteed to be unique on the given thread
and if A::AutoTraits: Send + Sync
on the given process.
Dynamic
implements OneShotIdentifier
if P == ()
, i.e. there is no pool
Implementations§
Source§impl<A: ScalarAllocator> Dynamic<A>
impl<A: ScalarAllocator> Dynamic<A>
Sourcepub fn with_alloc() -> Self
pub fn with_alloc() -> Self
Create a new Dynamic
using the given ScalarAllocator
Source§impl<A: ScalarAllocator, P: PoolMut<A>> Dynamic<A, P>
impl<A: ScalarAllocator, P: PoolMut<A>> Dynamic<A, P>
Sourcepub fn with_alloc_and_pool(pool: P) -> Self
pub fn with_alloc_and_pool(pool: P) -> Self
Create a new Dynamic
using the given ScalarAllocator
and pool
Source§impl<A: ScalarAllocator, P: PoolMut<A>> Dynamic<A, P>
impl<A: ScalarAllocator, P: PoolMut<A>> Dynamic<A, P>
Sourcepub fn owns_token(&self, token: &DynamicToken<A>) -> bool
pub fn owns_token(&self, token: &DynamicToken<A>) -> bool
Checks if self created the given DynamicToken
Sourcepub fn token(&self) -> DynamicToken<A>
pub fn token(&self) -> DynamicToken<A>
Creates a DynamicToken
Trait Implementations§
Source§impl<A: ScalarAllocator, P: PoolMut<A>> Identifier for Dynamic<A, P>
impl<A: ScalarAllocator, P: PoolMut<A>> Identifier for Dynamic<A, P>
impl<A: ScalarAllocator> OneShotIdentifier for Dynamic<A>
Auto Trait Implementations§
impl<A, P> Freeze for Dynamic<A, P>
impl<A, P> RefUnwindSafe for Dynamic<A, P>where
<A as ScalarAllocator>::Scalar: RefUnwindSafe,
P: RefUnwindSafe,
<A as ScalarAllocator>::AutoTraits: RefUnwindSafe,
impl<A, P> Send for Dynamic<A, P>
impl<A, P> Sync for Dynamic<A, P>
impl<A, P> Unpin for Dynamic<A, P>
impl<A, P> UnwindSafe for Dynamic<A, P>where
<A as ScalarAllocator>::Scalar: UnwindSafe,
P: UnwindSafe,
<A as ScalarAllocator>::AutoTraits: 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