austinjones / lifeline-rs

A dependency injection library for message-based applications
MIT License
38 stars 3 forks source link

Add Sender / Receiver traits. #19

Closed austinjones closed 4 years ago

austinjones commented 4 years ago

Add traits to generalize Sender & Receivers.

This makes applications with tons of channels much easier to change, and much easier to learn (senders go ?, receivers are Some).

It also smooths over the tokio err types that don't implement std::error::Error, and are really akward w/ anyhow.

It also allows 'impl Sender' in the arguments for a service Self::run_xyz function.