pub trait Codec {
    fn encode<I>(input: I) -> JsValue
    where
        I: Serialize
; fn decode<O>(input: JsValue) -> O
    where
        O: for<'de> Deserialize<'de>
; }
Expand description

Message Encoding and Decoding Format

Required Methods

Encode an input to JsValue

Decode a message to a type

Implementors