Struct ConnectionResult
struct ConnectionResult {
reason: DisconnectReason,
did_connect: bool,
}Expand description
Result of a single connection attempt.
Fields§
§reason: DisconnectReason§did_connect: booltrue if the TCP connection and CONNACK handshake completed
successfully. Used to decide whether to reset the reconnect backoff.
Implementations§
§impl ConnectionResult
impl ConnectionResult
const fn failed(reason: DisconnectReason) -> Self
const fn failed(reason: DisconnectReason) -> Self
Connection failed before CONNACK handshake completed.
const fn connected_then(reason: DisconnectReason) -> Self
const fn connected_then(reason: DisconnectReason) -> Self
Connection was established and later ended.
Auto Trait Implementations§
impl Freeze for ConnectionResult
impl RefUnwindSafe for ConnectionResult
impl Send for ConnectionResult
impl Sync for ConnectionResult
impl Unpin for ConnectionResult
impl UnwindSafe for ConnectionResult
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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