This is unreleased documentation for Yew Next version.
For up-to-date documentation, see the latest version on docs.rs.
yew_agent

Trait Codec

pub trait Codec {
    // Required methods
    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§

fn encode<I>(input: I) -> JsValue
where I: Serialize,

Encode an input to JsValue

fn decode<O>(input: JsValue) -> O
where O: for<'de> Deserialize<'de>,

Decode a message to a type

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.

Implementors§

§

impl Codec for Bincode