[][src]Enum mpd_protocol::parser::Response

pub enum Response<'a> {
    Success {
        fields: Vec<(&'a str, &'a str)>,
        binary: Option<&'a [u8]>,
    },
    Error {
        code: u64,
        command_index: u64,
        current_command: Option<&'a str>,
        message: &'a str,
    },
}

Complete response, either succesful or an error. Succesful responses may be empty.

Parsed from raw data using response. See also the notes about parser support.

Variants

Success

Successful response.

Fields of Success

fields: Vec<(&'a str, &'a str)>

Key-value pairs. Keys may occur any number of times.

binary: Option<&'a [u8]>

Binary field.

Error

Error response.

Fields of Error

code: u64

Error code, as defined by MPD.

command_index: u64

Index of command that caused this error in a command list.

current_command: Option<&'a str>

Command that caused this error, if any.

message: &'a str

Message describing the nature of the error.

Trait Implementations

impl<'a> Clone for Response<'a>[src]

impl<'a> Debug for Response<'a>[src]

impl<'a> Eq for Response<'a>[src]

impl<'a> PartialEq<Response<'a>> for Response<'a>[src]

impl<'a> StructuralEq for Response<'a>[src]

impl<'a> StructuralPartialEq for Response<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Response<'a>

impl<'a> Send for Response<'a>

impl<'a> Sync for Response<'a>

impl<'a> Unpin for Response<'a>

impl<'a> UnwindSafe for Response<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.