sod-bus

sod::MutService implementations to interact with bus::Bus.

Service Impls

Example

```rust use sod::MutService; use sod_bus::{BusBroadcaster, BusReceiver};

let mut broadcaster = BusBroadcaster::withlen(1024); let mut receiver1 = broadcaster.createreceiver(); let mut receiver2 = broadcaster.create_receiver();

broadcaster.process(1).unwrap(); broadcaster.process(2).unwrap(); broadcaster.process(3).unwrap();

asserteq!(receiver1.process(()).unwrap(), 1); asserteq!(receiver1.process(()).unwrap(), 2); assert_eq!(receiver1.process(()).unwrap(), 3);

asserteq!(receiver2.process(()).unwrap(), 1); asserteq!(receiver2.process(()).unwrap(), 2); assert_eq!(receiver2.process(()).unwrap(), 3); ```