pub struct TokioNetworkProvider;Expand description
Real Tokio networking implementation.
Implementations§
Source§impl TokioNetworkProvider
impl TokioNetworkProvider
Sourcepub fn new() -> TokioNetworkProvider
pub fn new() -> TokioNetworkProvider
Create a new Tokio network provider.
Trait Implementations§
Source§impl Clone for TokioNetworkProvider
impl Clone for TokioNetworkProvider
Source§fn clone(&self) -> TokioNetworkProvider
fn clone(&self) -> TokioNetworkProvider
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokioNetworkProvider
impl Debug for TokioNetworkProvider
Source§impl Default for TokioNetworkProvider
impl Default for TokioNetworkProvider
Source§fn default() -> TokioNetworkProvider
fn default() -> TokioNetworkProvider
Returns the “default value” for a type. Read more
Source§impl NetworkProvider for TokioNetworkProvider
impl NetworkProvider for TokioNetworkProvider
Source§type TcpListener = TokioTcpListener
type TcpListener = TokioTcpListener
The TCP listener type for this provider.
Source§fn bind<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<<TokioNetworkProvider as NetworkProvider>::TcpListener, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
TokioNetworkProvider: 'async_trait,
fn bind<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<<TokioNetworkProvider as NetworkProvider>::TcpListener, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
TokioNetworkProvider: 'async_trait,
Create a TCP listener bound to the given address.
Source§fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<<TokioNetworkProvider as NetworkProvider>::TcpStream, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
TokioNetworkProvider: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<<TokioNetworkProvider as NetworkProvider>::TcpStream, Error>> + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
TokioNetworkProvider: 'async_trait,
Connect to a remote address.
Auto Trait Implementations§
impl Freeze for TokioNetworkProvider
impl RefUnwindSafe for TokioNetworkProvider
impl Send for TokioNetworkProvider
impl Sync for TokioNetworkProvider
impl Unpin for TokioNetworkProvider
impl UnwindSafe for TokioNetworkProvider
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)