[−][src]Struct ckb_async_runtime::Handle
Handle to the runtime.
Implementations
impl Handle[src]
pub fn enter<F, R>(&self, f: F) -> R where
F: FnOnce() -> R, [src]
F: FnOnce() -> R,
Enter the runtime context. This allows you to construct types that must
have an executor available on creation such as [Delay] or [TcpStream].
It will also allow you to call methods such as tokio::spawn.
pub fn spawn<F>(&self, future: F) -> JoinHandle<F::Output> where
F: Future + Send + 'static,
F::Output: Send + 'static, [src]
F: Future + Send + 'static,
F::Output: Send + 'static,
Spawns a future onto the runtime.
This spawns the given future onto the runtime's executor
pub fn block_on<F: Future>(&self, future: F) -> F::Output[src]
Run a future to completion on the Tokio runtime from a synchronous context.
Trait Implementations
impl Clone for Handle[src]
impl Debug for Handle[src]
impl Spawn for Handle[src]
pub fn spawn_task<F>(&self, future: F) where
F: Future<Output = ()> + Send + 'static, [src]
F: Future<Output = ()> + Send + 'static,
Auto Trait Implementations
impl !RefUnwindSafe for Handle[src]
impl Send for Handle[src]
impl Sync for Handle[src]
impl Unpin for Handle[src]
impl !UnwindSafe for Handle[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Erased for T
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,