diff --git a/Cargo.toml b/Cargo.toml index 539eb74..f2d2a45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ members = [ ] [workspace.package] -version = "0.3.2" +version = "0.3.3" edition = "2021" repository = "https://git.bfpower.io/BFPOWER/physical" readme = "README.md" diff --git a/node/src/comms.rs b/node/src/comms.rs index d08b29b..1d83d84 100644 --- a/node/src/comms.rs +++ b/node/src/comms.rs @@ -1,11 +1,15 @@ +//! These abstractions are only for persistent connections (never intended to end)! + pub trait Sender { - async fn send(&mut self, msg: &[u8]) -> Result<(), Reset>; + async fn send(&mut self, msg: &[u8]) -> self::Result; } pub trait Receiver { - async fn receive(&mut self, buffer: &mut [u8]) -> Result<(), Reset>; + async fn receive(&mut self, buffer: &mut [u8]) -> self::Result; } +pub type Result = core::result::Result; + //TODO: Replace with ! pub struct Never;