Trait gloo_worker::Codec
source · [−]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
fn decode<O>(input: JsValue) -> O where
O: for<'de> Deserialize<'de>,
fn decode<O>(input: JsValue) -> O where
O: for<'de> Deserialize<'de>,
Decode a message to a type