pub trait Dialer: Send {
// Required method
fn connect(&self) -> BoxFut<'_, TransportResult<Box<dyn Connection>>>;
}Expand description
The initiating (client) side — the dual of Listener; dials out and
produces the same Connection.
Required Methods§
Sourcefn connect(&self) -> BoxFut<'_, TransportResult<Box<dyn Connection>>>
fn connect(&self) -> BoxFut<'_, TransportResult<Box<dyn Connection>>>
Open a connection to the configured remote.
Trait Implementations§
Source§impl Dialer for Box<dyn Dialer>
A boxed dialer is itself a Dialer, so a runtime-selected
Box<dyn Dialer> — from a scheme:// URL resolver, say — can be passed
where run_client<D: Dialer> is expected. The Send supertrait makes
the box Send + 'static.
impl Dialer for Box<dyn Dialer>
A boxed dialer is itself a Dialer, so a runtime-selected
Box<dyn Dialer> — from a scheme:// URL resolver, say — can be passed
where run_client<D: Dialer> is expected. The Send supertrait makes
the box Send + 'static.
Source§fn connect(&self) -> BoxFut<'_, TransportResult<Box<dyn Connection>>>
fn connect(&self) -> BoxFut<'_, TransportResult<Box<dyn Connection>>>
Open a connection to the configured remote.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Dialer for Box<dyn Dialer>
A boxed dialer is itself a Dialer, so a runtime-selected
Box<dyn Dialer> — from a scheme:// URL resolver, say — can be passed
where run_client<D: Dialer> is expected. The Send supertrait makes
the box Send + 'static.
impl Dialer for Box<dyn Dialer>
A boxed dialer is itself a Dialer, so a runtime-selected
Box<dyn Dialer> — from a scheme:// URL resolver, say — can be passed
where run_client<D: Dialer> is expected. The Send supertrait makes
the box Send + 'static.