[][src]Trait queen::net::Codec

pub trait Codec: Send + 'static {
    fn new() -> Self;
fn decode(
        &mut self,
        crypto: &Option<Crypto>,
        bytes: Vec<u8>
    ) -> Result<Message>;
fn encode(
        &mut self,
        crypto: &Option<Crypto>,
        message: Message
    ) -> Result<Vec<u8>>; }

Required methods

fn new() -> Self

fn decode(&mut self, crypto: &Option<Crypto>, bytes: Vec<u8>) -> Result<Message>

fn encode(
    &mut self,
    crypto: &Option<Crypto>,
    message: Message
) -> Result<Vec<u8>>

Loading content...

Implementors

impl Codec for NsonCodec[src]

Loading content...