pub struct Runtime<RK: RuntimeKit + 'static> { /* private fields */ }
Expand description
A full-featured Runtime implementation
Implementations§
Source§impl<RK: RuntimeKit + 'static> Runtime<RK>
impl<RK: RuntimeKit + 'static> Runtime<RK>
Sourcepub fn to_socket_addrs<A: ToSocketAddrs + Send + 'static>(
&self,
addrs: A,
) -> impl AsyncToSocketAddrs
pub fn to_socket_addrs<A: ToSocketAddrs + Send + 'static>( &self, addrs: A, ) -> impl AsyncToSocketAddrs
Asynchronously resolve the given domain name
Source§impl Runtime<RuntimeParts<AsyncGlobalExecutor, AsyncIO>>
impl Runtime<RuntimeParts<AsyncGlobalExecutor, AsyncIO>>
Sourcepub fn async_global_executor() -> Self
pub fn async_global_executor() -> Self
Create a new SmolRuntime
Trait Implementations§
Source§impl<RK: RuntimeKit + 'static> Executor for Runtime<RK>
impl<RK: RuntimeKit + 'static> Executor for Runtime<RK>
Source§impl<RK: RuntimeKit + 'static> From<RK> for Runtime<RK>
impl<RK: RuntimeKit + 'static> From<RK> for Runtime<RK>
Source§impl<RK: RuntimeKit + Sync + 'static> Reactor for Runtime<RK>
impl<RK: RuntimeKit + Sync + 'static> Reactor for Runtime<RK>
Source§fn register<H: IO + Send + 'static>(
&self,
socket: IOHandle<H>,
) -> Result<impl AsyncIOHandle + Send>
fn register<H: IO + Send + 'static>( &self, socket: IOHandle<H>, ) -> Result<impl AsyncIOHandle + Send>
Register a synchronous handle, returning an asynchronous one
Source§fn interval(&self, dur: Duration) -> impl Stream<Item = Instant>
fn interval(&self, dur: Duration) -> impl Stream<Item = Instant>
Stream that yields at every given interval
Source§fn tcp_connect<'life0, 'async_trait>(
&'life0 self,
addr: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<impl AsyncIOHandle + Send>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tcp_connect<'life0, 'async_trait>(
&'life0 self,
addr: SocketAddr,
) -> Pin<Box<dyn Future<Output = Result<impl AsyncIOHandle + Send>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a TcpStream by connecting to a remote host
Auto Trait Implementations§
impl<RK> Freeze for Runtime<RK>where
RK: Freeze,
impl<RK> RefUnwindSafe for Runtime<RK>where
RK: RefUnwindSafe,
impl<RK> Send for Runtime<RK>where
RK: Send,
impl<RK> Sync for Runtime<RK>where
RK: Sync,
impl<RK> Unpin for Runtime<RK>where
RK: Unpin,
impl<RK> UnwindSafe for Runtime<RK>where
RK: UnwindSafe,
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