Added comms::Result
This commit is contained in:
@ -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"
|
||||
|
@ -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<Never, Reset>;
|
||||
|
||||
//TODO: Replace with !
|
||||
pub struct Never;
|
||||
|
||||
|
Reference in New Issue
Block a user