[][src]Function stateright::actor::spawn

pub fn spawn<A, E: Debug + 'static>(
    serialize: fn(_: &A::Msg) -> Result<Vec<u8>, E>,
    deserialize: fn(_: &[u8]) -> Result<A::Msg, E>,
    actors: Vec<(impl Into<Id>, A)>
) -> Vec<JoinHandle<()>> where
    A: 'static + Send + Actor,
    A::Msg: Debug,
    A::State: Debug

Runs an actor, sending messages over UDP.