[−][src]Struct mpd_protocol::codec::MpdCodec
Codec for MPD protocol.
Methods
impl MpdCodec
[src]
pub fn new() -> Self
[src]
Creates a new MpdCodec
.
pub fn protocol_version(&self) -> Option<&str>
[src]
Returns the protocol version the server is speaking if this decoder instance already
received a greeting, None
otherwise.
Trait Implementations
impl Clone for MpdCodec
[src]
impl Debug for MpdCodec
[src]
impl Decoder for MpdCodec
[src]
type Item = Response
The type of decoded frames.
type Error = MpdCodecError
The type of unrecoverable frame decoding errors. Read more
fn decode(
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
[src]
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
fn decode_eof(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
[src]
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
fn framed<T>(self, io: T) -> Framed<T, Self> where
Self: Encoder,
T: AsyncRead + AsyncWrite,
[src]
Self: Encoder,
T: AsyncRead + AsyncWrite,
impl Default for MpdCodec
[src]
impl Encoder for MpdCodec
[src]
type Item = Command
The type of items consumed by the Encoder
type Error = MpdCodecError
The type of encoding errors. Read more
fn encode(
&mut self,
command: Self::Item,
buf: &mut BytesMut
) -> Result<(), Self::Error>
[src]
&mut self,
command: Self::Item,
buf: &mut BytesMut
) -> Result<(), Self::Error>
impl Eq for MpdCodec
[src]
impl Hash for MpdCodec
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<MpdCodec> for MpdCodec
[src]
impl StructuralEq for MpdCodec
[src]
impl StructuralPartialEq for MpdCodec
[src]
Auto Trait Implementations
impl RefUnwindSafe for MpdCodec
impl Send for MpdCodec
impl Sync for MpdCodec
impl Unpin for MpdCodec
impl UnwindSafe for MpdCodec
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,