use crate::{BufferError, Device};
use winter_maybe_async::maybe_async;
#[derive(Debug, Default)]
pub struct VoidDevice {}
impl VoidDevice {
pub fn new() -> Self {
Self::default()
}
}
impl Device for VoidDevice {
type Error = BufferError;
#[maybe_async]
fn read(&mut self) -> Result<Option<u8>, Self::Error> {
Ok(None)
}
#[maybe_async]
fn write(&mut self, _byte: u8) -> Result<(), Self::Error> {
Ok(())
}
#[maybe_async]
fn write_error(&mut self, _byte: u8) -> Result<(), Self::Error> {
Ok(())
}
}