pub struct Writer<'a> { /* private fields */ }
Expand description
An IO Writer with color printing to the terminal.
Implementations§
Source§impl<'a> Writer<'a>
impl<'a> Writer<'a>
pub fn new(w: impl Write + 'a) -> Self
pub fn encode<T: Encode>(&mut self, arg: &T) -> Result<(), Error>
pub fn styled(self, value: bool) -> Self
pub fn write(&mut self, s: impl Display, style: Style) -> Result<()>
pub fn meta(&mut self, s: impl Display) -> Result<()>
pub fn magenta(&mut self, s: impl Display) -> Result<()>
Auto Trait Implementations§
impl<'a> Freeze for Writer<'a>
impl<'a> !RefUnwindSafe for Writer<'a>
impl<'a> !Send for Writer<'a>
impl<'a> !Sync for Writer<'a>
impl<'a> Unpin for Writer<'a>
impl<'a> !UnwindSafe for Writer<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more