pub struct Registry<T: 'static> { /* private fields */ }Expand description
The closures waiting on one declared function’s completions, keyed by token. The generator
emits one static per Done declaration; a foreign arm receives the token and the generated
completion export resolves it here.
Implementations§
Source§impl<T: Send + 'static> Registry<T>
impl<T: Send + 'static> Registry<T>
Sourcepub fn complete(&self, token: u64, value: Result<T, Error>) -> bool
pub fn complete(&self, token: u64, value: Result<T, Error>) -> bool
Resolve token with value. false when nothing waits under it: already completed,
cancelled, or never issued, every one of which is a no-op by contract.
Sourcepub fn is_pending(&self, token: u64) -> bool
pub fn is_pending(&self, token: u64) -> bool
Whether a closure still waits under token.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Registry<T>
impl<T> Forget for Registry<T>
impl<T> Move for Registry<T>
impl<T> RefUnwindSafe for Registry<T>
impl<T> Send for Registry<T>
impl<T> Sync for Registry<T>
impl<T> Unpin for Registry<T>
impl<T> UnsafeUnpin for Registry<T>
impl<T> UnwindSafe for Registry<T>
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