mm1-core 0.7.23

An Erlang-style actor runtime for Rust.
Documentation
use std::time::Duration;

use mm1_address::address::Address;
use mm1_common::errors::error_of::ErrorOf;
use mm1_proto_system::{SpawnErrorKind, StartErrorKind};

pub trait Start<Runnable> {
    fn spawn(
        &mut self,
        runnable: Runnable,
        link: bool,
    ) -> impl Future<Output = Result<Address, ErrorOf<SpawnErrorKind>>> + Send;

    fn start(
        &mut self,
        runnable: Runnable,
        link: bool,
        start_timeout: Duration,
    ) -> impl Future<Output = Result<Address, ErrorOf<StartErrorKind>>> + Send;
}

pub trait InitDone {
    fn init_done(&mut self, address: Address) -> impl Future<Output = ()> + Send;
}