#[non_exhaustive]pub enum SessionEnd {
Kicked {
reason: String,
json: String,
},
ServerClosed,
Quit(String),
Shutdown,
Transferred {
host: String,
port: u16,
},
}Expand description
How a session that reached the play state ended without an error.
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.
Kicked
The server kicked the player.
Fields
ServerClosed
The server closed the connection without a reason.
Quit(String)
The behaviour called crate::TickContext::disconnect.
Shutdown
The shutdown future given to crate::Client::run_until completed.
Transferred
The server sent the client to another server (1.20.5+ transfer, from the
configuration or the play state) and crate::Client::follow_transfers is off (or the
transfer limit was reached). Vanilla connects there with the transfer intent.
Trait Implementations§
Source§impl Clone for SessionEnd
impl Clone for SessionEnd
Source§fn clone(&self) -> SessionEnd
fn clone(&self) -> SessionEnd
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionEnd
impl Debug for SessionEnd
impl Eq for SessionEnd
Source§impl PartialEq for SessionEnd
impl PartialEq for SessionEnd
impl StructuralPartialEq for SessionEnd
Auto Trait Implementations§
impl Forget for SessionEnd
impl Freeze for SessionEnd
impl Move for SessionEnd
impl RefUnwindSafe for SessionEnd
impl Send for SessionEndwhere
RawVecInner: Send,
impl Sync for SessionEndwhere
RawVecInner: Sync,
impl Unpin for SessionEnd
impl UnsafeUnpin for SessionEnd
impl UnwindSafe for SessionEndwhere
RawVecInner: UnwindSafe,
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