pub(crate) enum Handle {
CurrentThread(Arc<Handle>),
MultiThread(Arc<Handle>),
}
Variants§
Implementations§
source§impl Handle
impl Handle
pub(crate) fn current() -> Handle
pub(crate) fn blocking_spawner(&self) -> &Spawner
pub(crate) fn spawn<F>(&self, future: F, id: Id) -> JoinHandle<F::Output> ⓘwhere F: Future + Send + 'static, F::Output: Send + 'static,
pub(crate) fn shutdown(&self)
pub(crate) fn seed_generator(&self) -> &RngSeedGenerator
pub(crate) fn as_current_thread(&self) -> &Arc<Handle>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl !UnwindSafe for Handle
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