pub struct RuntimeScopedIdCounter<I> { /* private fields */ }Implementations§
Source§impl<I: RuntimeScopedIdType> RuntimeScopedIdCounter<I>
impl<I: RuntimeScopedIdType> RuntimeScopedIdCounter<I>
Sourcepub fn new(runtime: RuntimeId) -> Self
pub fn new(runtime: RuntimeId) -> Self
Mint a scoped-id counter for runtime. Runtime-internal registries
(channels, promises, resource gates) that live inside one runtime’s
state cell construct their own counter from the runtime identity the
completion registrar issued, so a scoped id always carries its owning
runtime for cross-runtime misuse detection.
pub fn allocate(&mut self) -> Result<I, IdExhausted>
pub fn is_exhausted(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<I> Freeze for RuntimeScopedIdCounter<I>
impl<I> RefUnwindSafe for RuntimeScopedIdCounter<I>
impl<I> Send for RuntimeScopedIdCounter<I>
impl<I> Sync for RuntimeScopedIdCounter<I>
impl<I> Unpin for RuntimeScopedIdCounter<I>
impl<I> UnsafeUnpin for RuntimeScopedIdCounter<I>
impl<I> UnwindSafe for RuntimeScopedIdCounter<I>
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