mm1_core/context/
start.rs1use std::future::Future;
2use std::time::Duration;
3
4use mm1_address::address::Address;
5use mm1_common::errors::error_of::ErrorOf;
6use mm1_proto_system::{SpawnErrorKind, StartErrorKind};
7
8pub trait Start<Runnable> {
9 fn spawn(
10 &mut self,
11 runnable: Runnable,
12 link: bool,
13 ) -> impl Future<Output = Result<Address, ErrorOf<SpawnErrorKind>>> + Send;
14
15 fn start(
16 &mut self,
17 runnable: Runnable,
18 link: bool,
19 start_timeout: Duration,
20 ) -> impl Future<Output = Result<Address, ErrorOf<StartErrorKind>>> + Send;
21}
22
23pub trait InitDone {
24 fn init_done(&mut self, address: Address) -> impl Future<Output = ()> + Send;
25}