Skip to content

Commit

Permalink
0.2.1 + Remove Serves, Stores, Carries. (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinjones authored Aug 31, 2020
1 parent 4d45599 commit ebf1201
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lifeline"
version = "0.2.0"
version = "0.2.1"
description = "Lifeline is a dependency injection library for message-based applications."
keywords = ["async", "tokio", "async", "actor", "actors"]
categories = ["Asynchronous", "Rust patterns"]
Expand Down
8 changes: 4 additions & 4 deletions src/bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ pub trait Message<Bus>: Debug {

pub trait Resource<Bus>: Storage + Debug + Send {}

pub trait Serves<Msg> {}
impl<B, Msg> Serves<Msg> for B where Msg: Message<B> {}
// pub trait Serves<Msg> {}
// impl<B, Msg> Serves<Msg> for B where Msg: Message<B> {}

pub trait Stores<Res> {}
impl<B, R> Stores<R> for B where R: Resource<B> {}
// pub trait Stores<Res> {}
// impl<B, R> Stores<R> for B where R: Resource<B> {}

/// The bus carries
pub trait Bus: Default + Debug + Sized {
Expand Down
12 changes: 6 additions & 6 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ pub trait Task {

impl<T> Task for T {}

#[async_trait]
pub trait AsyncService: Task {
type Bus: Bus;
type Lifeline;
// #[async_trait]
// pub trait AsyncService: Task {
// type Bus: Bus;
// type Lifeline;

async fn spawn(bus: &Self::Bus) -> Self::Lifeline;
}
// async fn spawn(bus: &Self::Bus) -> Self::Lifeline;
// }

// #[async_trait]
// pub trait AsyncCarrier: Task {
Expand Down

0 comments on commit ebf1201

Please sign in to comment.