[][src]Struct mpdpopm::ratings::RatingRequest

pub struct RatingRequest {
    pub rating: u8,
    pub track: RatedTrack,
}

A request from a client to rate a track.

Fields

rating: u8track: RatedTrack

Trait Implementations

impl Debug for RatingRequest[src]

impl<'_> TryFrom<&'_ str> for RatingRequest[src]

Produce a RatingRequest instance from a line of `mpd' output.

type Error = Error

The type returned in the event of a conversion error.

pub fn try_from(text: &str) -> Result<Self, Self::Error>[src]

Attempt to produce a RatingRequest instance from a line of `mpd' response to a "readmessages" command. After the channel line, each subsequent line will be of the form "message: $MESSAGE"-- this method assumes that the "message: " prefix has been stripped off (i.e. we're dealing with a single line of text containing only our custom message format).

For ratings, we expect a message of the form: "RATING (TRACK)?".

Auto Trait Implementations

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> DebugAny for T where
    T: Any + Debug

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

impl<T> UnsafeAny for T where
    T: Any