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

Fields

data: String
source: ParseIntError
backtrace: Backtrace

ServerError

Fields

response: ErrorResponse
backtrace: Backtrace

TS3-Server error response

ResponseLimit

Fields

response: Vec<String>
backtrace: Backtrace

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

Fields

length: usize
expected: usize

Invalid name length. Client-Name is longer than allowed!

NoEntryResponse

Fields

key: &'static str
backtrace: Backtrace

No entry for key in server response, expected one.

NoValueResponse

Fields

key: &'static str
backtrace: Backtrace

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

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

Returns a Backtrace that may be printed.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.