pub struct Tokio { /* private fields */ }
Expand description
Dummy object implementing async common interfaces on top of tokio
Implementations§
Source§impl Tokio
impl Tokio
Sourcepub fn with_handle(self, handle: Handle) -> Self
pub fn with_handle(self, handle: Handle) -> Self
Bind to the tokio Runtime associated to this handle by default.
Sourcepub fn with_runtime(self, runtime: TokioRT) -> Self
pub fn with_runtime(self, runtime: TokioRT) -> Self
Bind to the tokio Runtime associated to this handle by default.
Trait Implementations§
Source§impl Executor for Tokio
impl Executor for Tokio
Source§type Task<T: Send + 'static> = TTask<T>
type Task<T: Send + 'static> = TTask<T>
The type representing the tasks the are returned when spawning a Future on the executor
Source§impl Reactor for Tokio
impl Reactor for Tokio
Source§type TcpStream = Compat<TcpStream>
type TcpStream = Compat<TcpStream>
The type representing a TCP stream (after tcp_connect) for this reactor
Source§fn register<H: Read + Write + AsSysFd + Send + 'static>(
&self,
socket: H,
) -> Result<impl AsyncRead + AsyncWrite + Send + Unpin + 'static>
fn register<H: Read + Write + AsSysFd + Send + 'static>( &self, socket: H, ) -> Result<impl AsyncRead + AsyncWrite + Send + Unpin + 'static>
Register a synchronous handle, returning an asynchronous one
Source§fn sleep(&self, dur: Duration) -> impl Future<Output = ()> + Send + 'static
fn sleep(&self, dur: Duration) -> impl Future<Output = ()> + Send + 'static
Sleep for the given duration
Source§fn interval(
&self,
dur: Duration,
) -> impl Stream<Item = Instant> + Send + 'static
fn interval( &self, dur: Duration, ) -> impl Stream<Item = Instant> + Send + 'static
Stream that yields at every given interval
Source§fn tcp_connect_addr(
&self,
addr: SocketAddr,
) -> impl Future<Output = Result<Self::TcpStream>> + Send + 'static
fn tcp_connect_addr( &self, addr: SocketAddr, ) -> impl Future<Output = Result<Self::TcpStream>> + Send + 'static
Create a TcpStream by connecting to a remote host
impl RuntimeKit for Tokio
Auto Trait Implementations§
impl Freeze for Tokio
impl RefUnwindSafe for Tokio
impl Send for Tokio
impl Sync for Tokio
impl Unpin for Tokio
impl UnwindSafe for Tokio
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