Trait Decode

Source
pub trait Decode: Sized {
    type Error: Error;

    // Required method
    fn decode(buf: &[u8]) -> Result<Self, Self::Error>;
}
Expand description

Any type implementing Decode can be directly decoded from the TS3 stream. It provides the complete buffer of the response from the stream.

Required Associated Types§

Required Methods§

Source

fn decode(buf: &[u8]) -> Result<Self, Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Decode for bool

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<bool, Self::Error>

Source§

impl Decode for i8

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<i8, Self::Error>

Source§

impl Decode for i16

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<i16, Self::Error>

Source§

impl Decode for i32

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<i32, Self::Error>

Source§

impl Decode for i64

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<i64, Self::Error>

Source§

impl Decode for i128

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<i128, Self::Error>

Source§

impl Decode for isize

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<isize, Self::Error>

Source§

impl Decode for u8

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<u8, Self::Error>

Source§

impl Decode for u16

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<u16, Self::Error>

Source§

impl Decode for u32

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<u32, Self::Error>

Source§

impl Decode for u64

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<u64, Self::Error>

Source§

impl Decode for u128

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<u128, Self::Error>

Source§

impl Decode for ()

Implement Decode for (). Calling ()::decode(&[u8]) will never fail and can always be unwrapped safely.

Source§

impl Decode for usize

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<usize, Self::Error>

Source§

impl Decode for String

Source§

type Error = Error

Source§

fn decode(buf: &[u8]) -> Result<String, Self::Error>

Implementors§

Source§

impl Decode for ReasonId

Source§

impl Decode for VirtualServerStatus

Source§

impl Decode for ApiKeyScope

Source§

impl Decode for ChannelCreated

Source§

impl Decode for ChannelDeleted

Source§

impl Decode for ChannelDescriptionChanged

Source§

impl Decode for ChannelEdited

Source§

impl Decode for ChannelMoved

Source§

impl Decode for ChannelPasswordChanged

Source§

impl Decode for ClientEnterView

Source§

impl Decode for ClientLeftView

Source§

impl Decode for ClientMoved

Source§

impl Decode for ServerEdited

Source§

impl Decode for TextMessage

Source§

impl Decode for TokenUsed

Source§

impl Decode for ApiKey

Source§

impl Decode for Entry

Source§

impl Decode for Response

Source§

impl Decode for Version

Source§

impl Decode for Whoami

Source§

impl Decode for ApiKeyId

Source§

impl Decode for ChannelGroupId

Source§

impl Decode for ChannelId

Source§

impl Decode for ClientDatabaseId

Source§

impl Decode for ClientId

Source§

impl Decode for ServerGroupId

Source§

impl Decode for ServerId

Source§

impl<T, S> Decode for List<T, S>
where T: Decode, S: Separator,

Source§

type Error = <T as Decode>::Error