pub trait Read {
type Error;
fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error>;
}
pub trait Write {
type Error;
fn write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Self::Error>;
}
#[cfg(feature = "unproven")]
pub trait WriteIter {
type Error;
fn write<B>(&mut self, addr: u8, bytes: B) -> Result<(), Self::Error>
where
B: IntoIterator<Item = u8>;
}
pub trait WriteRead {
type Error;
fn write_read(
&mut self,
address: u8,
bytes: &[u8],
buffer: &mut [u8],
) -> Result<(), Self::Error>;
}
#[cfg(feature = "unproven")]
pub trait WriteIterRead {
type Error;
fn write_iter_read<B>(
&mut self,
address: u8,
bytes: B,
buffer: &mut [u8],
) -> Result<(), Self::Error>
where
B: IntoIterator<Item = u8>;
}