pub struct DialRequest {
pub dialer_id: DialerId,
pub url: Url,
}Expand description
A request for the IO layer to establish a new transport for a dialer.
When a dialer needs a connection (either on initial registration or
after a reconnection backoff expires), the hub emits a DialRequest.
The IO layer should:
- Attempt to establish a transport to the given URL.
- On success: call
HubEvent::create_dialer_connection(dialer_id)to get aConnectionId, wire up the stream/sink, then start driving the connection. - On failure: call
HubEvent::dial_failed(dialer_id, error).
Fields§
§dialer_id: DialerIdThe dialer that needs a transport.
url: UrlThe URL to connect to.
Trait Implementations§
Source§impl Clone for DialRequest
impl Clone for DialRequest
Source§fn clone(&self) -> DialRequest
fn clone(&self) -> DialRequest
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for DialRequest
impl RefUnwindSafe for DialRequest
impl Send for DialRequest
impl Sync for DialRequest
impl Unpin for DialRequest
impl UnsafeUnpin for DialRequest
impl UnwindSafe for DialRequest
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more