use core::fmt;
pub struct GenericPrinter<W> {
writer: W,
}
impl<W> GenericPrinter<W> {
pub const fn new(writer: W) -> Self {
Self {
writer
}
}
}
impl<W: fmt::Write> super::Printer for GenericPrinter<W> {
type W = W;
type M = crate::modes::InterruptFree;
#[inline]
fn destination(&mut self) -> &mut Self::W {
&mut self.writer
}
}
unsafe impl<W> Sync for GenericPrinter<W> {
}