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§
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 ()
Implement Decode
for ()
. Calling ()::decode(&[u8])
will never fail
and can always be unwrapped safely.
impl Decode for ()
Implement Decode
for ()
. Calling ()::decode(&[u8])
will never fail
and can always be unwrapped safely.