pub enum Ts3Error {
Utf8Error {
source: FromUtf8Error,
},
Io {
context: &'static str,
source: Error,
},
ConnectionClosed {
backtrace: Backtrace,
},
InvalidSocketAddress {
backtrace: Backtrace,
},
InvalidResponse {
context: &'static str,
data: String,
},
InvalidIntResponse {
data: String,
source: ParseIntError,
backtrace: Backtrace,
},
ServerError {
response: ErrorResponse,
backtrace: Backtrace,
},
ResponseLimit {
response: Vec<String>,
backtrace: Backtrace,
},
InvalidNameLength {
length: usize,
expected: usize,
},
NoEntryResponse {
key: &'static str,
backtrace: Backtrace,
},
NoValueResponse {
key: &'static str,
backtrace: Backtrace,
},
}
Variants
Utf8Error
Fields
source: FromUtf8Error
Error on response conversion with invalid utf8 data
Io
Fields
context: &'static str
Context of action, empty per default.
Please use a format like "reading connection: "
source: Error
Catch-all IO error, contains optional context
ConnectionClosed
Fields
backtrace: Backtrace
Reached EOF reading response, server closed connection / timeout.
InvalidSocketAddress
Fields
backtrace: Backtrace
InvalidResponse
Fields
context: &'static str
Context of action, empty per default.
Please use a format like "expected XY, got: "
data: String
Invalid response error. Server returned unexpected data.
InvalidIntResponse
ServerError
TS3-Server error response
ResponseLimit
Maximum amount of response bytes/lines reached, DDOS limit prevented further data read.
This will probably cause the current connection to become invalid due to remaining data in the connection.
InvalidNameLength
Invalid name length. Client-Name is longer than allowed!
NoEntryResponse
No entry for key in server response, expected one.
NoValueResponse
No value for key in response, expected some.
Implementations
Returns true if the error is of kind ServerError
Returns the ErrorResponse
if existing.
Trait Implementations
use the Display impl or to_string()
replaced by Error::source, which can support downcasting
The lower-level source of this error, if any. Read more