#[non_exhaustive]pub enum Event {
Message(ProtoMessage),
Disconnected(TransportError),
ReconnectFailed {
attempt: u32,
reason: TransportError,
},
Reconnected {
attempt: u32,
},
ReplayFailed {
key: ReplayKey,
error: ConnectorError,
},
SessionEnded(SessionEnded),
}Expand description
Something that happened on the connection without a request asking for it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Message(ProtoMessage)
The server sent a message that answers no pending request.
Disconnected(TransportError)
The connection was lost for the given reason; reconnection follows.
ReconnectFailed
An attempt to connect again failed; another one follows unless the limit is reached.
Fields
§
reason: TransportErrorReason the attempt failed.
Reconnected
The connection is established again and the registered requests were replayed.
ReplayFailed
A registered request was refused or left unanswered while it was replayed.
Fields
§
error: ConnectorErrorFailure of the replayed request.
SessionEnded(SessionEnded)
The server ended the authorisation of a session; its requests fail with
ConnectorError::SessionEnded until it is authorised again.
Implementations§
Trait Implementations§
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Forget for Event
impl Freeze for Event
impl Move for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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