Trait gloo_worker::Codec
source · 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§
sourcefn decode<O>(input: JsValue) -> Owhere
O: for<'de> Deserialize<'de>,
fn decode<O>(input: JsValue) -> Owhere
O: for<'de> Deserialize<'de>,
Decode a message to a type
Object Safety§
This trait is not object safe.