Trait ockam::Message[][src]

pub trait Message: 'static + Send + DeserializeOwned + Serialize {
    pub fn encode(&self) -> Result<Vec<u8, Global>, Error> { ... }
pub fn decode(e: &Vec<u8, Global>) -> Result<Self, Error> { ... } }

A user defined message that can be serialised and deserialised

Provided methods

pub fn encode(&self) -> Result<Vec<u8, Global>, Error>[src]

Encode the type representation into an Encoded type.

pub fn decode(e: &Vec<u8, Global>) -> Result<Self, Error>[src]

Decode an Encoded type into the Message’s type.

Loading content...

Implementors

impl<T> Message for T where
    T: Serialize + DeserializeOwned + Send + 'static, 
[src]

Loading content...