pub trait SplitDriver: 'static {
type Error: Error;
// Required methods
async fn recv(
&mut self,
buf: &mut [u8],
is_master: bool,
) -> Result<usize, Self::Error>;
async fn send_all(
&mut self,
buf: &[u8],
is_master: bool,
) -> Result<(), Self::Error>;
// Provided method
async fn init(&mut self) -> Result<(), Self::Error> { ... }
}Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
RKTK API Docs