[][src]Trait maxim::message::ActorMessage

pub trait ActorMessage: Send + Sync + Any {
    fn to_bincode(&self) -> Result<Vec<u8>, Box<dyn Error>> { ... }
fn from_bincode(_data: &Vec<u8>) -> Result<Self, Box<dyn Error>>
    where
        Self: Sized
, { ... } }

This defines any value safe to send across threads as an ActorMessage.

Provided methods

fn to_bincode(&self) -> Result<Vec<u8>, Box<dyn Error>>

Gets a bincode serialized version of the message and returns it in a result or an error indicating what went wrong.

fn from_bincode(_data: &Vec<u8>) -> Result<Self, Box<dyn Error>> where
    Self: Sized

Loading content...

Implementors

impl<T: 'static + ?Sized> ActorMessage for T where
    T: Serialize + DeserializeOwned + Sync + Send + Any
[src]

Loading content...