Trait ServerMessage

Source
pub trait ServerMessage: Sized {
    // Required method
    fn decode(buf: &mut dyn Buf) -> Result<(Self, usize), Error>;
}
Expand description

Trait representing an NT message/packet headed Server –> Client

Required Methods§

Source

fn decode(buf: &mut dyn Buf) -> Result<(Self, usize), Error>

Attempts to decode Self from the given buf Returns Some if the given buf was a valid NT packet Returns None if the given buf was malformed, or otherwise invalid

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 ServerMessage for String

Source§

fn decode(buf: &mut dyn Buf) -> Result<(Self, usize), Error>

Source§

impl ServerMessage for Vec<u8>

Source§

fn decode(buf: &mut dyn Buf) -> Result<(Self, usize), Error>

Source§

impl<T> ServerMessage for Vec<T>
where T: ServerMessage,

Source§

fn decode(buf: &mut dyn Buf) -> Result<(Self, usize), Error>

Implementors§