pub struct TokioRuntimeProvider(/* private fields */);
Available on crate feature
tokio-runtime
only.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
Source§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,
bind_addr: Option<SocketAddr>,
wait_for: Option<Duration>,
) -> Pin<Box<dyn Send + Future<Output = Result<Self::Tcp>>>>
fn connect_tcp( &self, server_addr: SocketAddr, bind_addr: Option<SocketAddr>, wait_for: Option<Duration>, ) -> 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.Source§fn quic_binder(&self) -> Option<&dyn QuicSocketBinder>
fn quic_binder(&self) -> Option<&dyn QuicSocketBinder>
Yields an object that knows how to bind a QUIC socket.
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