pub struct TokioRuntimeProvider(/* private fields */);
Expand description
The Tokio Runtime for async execution
Implementations§
Trait Implementations§
source§impl Clone for TokioRuntimeProvider
impl Clone for TokioRuntimeProvider
source§fn clone(&self) -> TokioRuntimeProvider
fn clone(&self) -> TokioRuntimeProvider
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for TokioRuntimeProvider
impl Default for TokioRuntimeProvider
source§fn default() -> TokioRuntimeProvider
fn default() -> TokioRuntimeProvider
Returns the “default value” for a type. Read more
source§impl RuntimeProvider for TokioRuntimeProvider
impl RuntimeProvider for TokioRuntimeProvider
§type Handle = TokioHandle
type Handle = TokioHandle
Handle to the executor;
source§fn create_handle(&self) -> Self::Handle
fn create_handle(&self) -> Self::Handle
Create a runtime handle
source§fn connect_tcp(
&self,
server_addr: SocketAddr,
) -> Pin<Box<dyn Send + Future<Output = Result<Self::Tcp>>>>
fn connect_tcp( &self, server_addr: SocketAddr, ) -> Pin<Box<dyn Send + Future<Output = Result<Self::Tcp>>>>
Create a TCP connection with custom configuration.
source§fn bind_udp(
&self,
local_addr: SocketAddr,
_server_addr: SocketAddr,
) -> Pin<Box<dyn Send + Future<Output = Result<Self::Udp>>>>
fn bind_udp( &self, local_addr: SocketAddr, _server_addr: SocketAddr, ) -> Pin<Box<dyn Send + Future<Output = Result<Self::Udp>>>>
Create a UDP socket bound to
local_addr
. The returned value should not be connected to server_addr
.
Notice: the future should be ready once returned at best effort. Otherwise UDP DNS may need much more retries.Auto Trait Implementations§
impl Freeze for TokioRuntimeProvider
impl RefUnwindSafe for TokioRuntimeProvider
impl Send for TokioRuntimeProvider
impl Sync for TokioRuntimeProvider
impl Unpin for TokioRuntimeProvider
impl UnwindSafe for TokioRuntimeProvider
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)