Added comms::Result
This commit is contained in:
@ -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