[][src]Enum ts3_query::Ts3Error

pub enum Ts3Error {
    Utf8Error {
        source: FromUtf8Error,
    },
    Io {
        context: &'static str,
        source: Error,
    },
    InvalidResponse {
        context: &'static str,
        data: String,
    },
    ServerError {
        response: ErrorResponse,
    },
    ResponseLimit {
        response: Vec<String>,
    },
}

Variants

Utf8Error

Error on response conversion with invalid utf8 data

Fields of Utf8Error

source: FromUtf8Error
Io

Catch-all IO error, contains optional context

Fields of Io

context: &'static str

Context of action, empty per default.

Please use a format like "reading connection: "

source: Error
InvalidResponse

Invalid response error. Server returned unexpected data.

Fields of InvalidResponse

context: &'static strdata: String
ServerError

TS3-Server error response

Fields of ServerError

response: ErrorResponse
ResponseLimit

Maximum amount of response 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.

Fields of ResponseLimit

response: Vec<String>

Methods

impl Ts3Error[src]

pub fn is_error_response(&self) -> bool[src]

Returns true if the error is of kind ServerError

pub fn error_response(&self) -> Option<&ErrorResponse>[src]

Returns the ErrorResponse if existing.

Trait Implementations

impl Debug for Ts3Error[src]

impl Display for Ts3Error[src]

impl Error for Ts3Error where
    Self: Debug + Display
[src]

impl ErrorCompat for Ts3Error[src]

impl From<Error> for Ts3Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for Ts3Error

impl Send for Ts3Error

impl Sync for Ts3Error

impl Unpin for Ts3Error

impl !UnwindSafe for Ts3Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsErrorSource for T where
    T: 'static + Error
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.