mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Feature/dependency autoconfig (#2588)
* dependency autoconfig * FE portion --------- Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -16,10 +16,13 @@ pub trait Actor: Send + 'static {
|
||||
fn init(&mut self, jobs: &mut BackgroundJobs) {}
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
pub trait Handler<M>: Actor {
|
||||
type Response: Any + Send;
|
||||
async fn handle(&mut self, msg: M, jobs: &mut BackgroundJobs) -> Self::Response;
|
||||
fn handle(
|
||||
&mut self,
|
||||
msg: M,
|
||||
jobs: &mut BackgroundJobs,
|
||||
) -> impl Future<Output = Self::Response> + Send;
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
||||
Reference in New Issue
Block a user