#[non_exhaustive]pub enum ClientError {
Show 13 variants
Connect(ConnectError),
Username(UsernameError),
Io(Error),
Frame(FrameError),
Decode {
state: State,
id: i32,
source: DecodeError,
},
World(WorldError),
Encode(EncodeError),
LoginRefused(String),
LoginClosed,
OnlineModeRequired,
Crypto(CryptoError),
Session(MicrosoftError),
Timeout(&'static str),
}Expand description
A session failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Connect(ConnectError)
Opening the connection (direct or through the proxy) failed.
Username(UsernameError)
The username is not valid for an offline login.
Io(Error)
Socket error.
Frame(FrameError)
Framing / compression / encryption error (the stream is unusable).
Decode
A packet the client needs could not be decoded.
World(WorldError)
Chunk data from the server was malformed. Since 0.1.3 a session no longer ends with it: the column is dropped, the error logged and play goes on (like vanilla). Kept for compatibility.
Encode(EncodeError)
A packet could not be encoded (a value the protocol cannot carry).
LoginRefused(String)
The server refused the login.
LoginClosed
The server closed the connection during login.
OnlineModeRequired
The server is in online mode but the account is an offline one.
Crypto(CryptoError)
The encryption handshake failed.
Session(MicrosoftError)
The session server refused the join (online mode).
Timeout(&'static str)
No data from the server for too long.
Trait Implementations§
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()