pub struct AnsiWriter<W>(pub W);
Expand description
An encode::Write
r that wraps an io::Write
r, emitting ANSI escape codes
for text style.
Tuple Fields§
§0: W
Trait Implementations§
source§impl<W: Clone> Clone for AnsiWriter<W>
impl<W: Clone> Clone for AnsiWriter<W>
source§impl<W: Debug> Debug for AnsiWriter<W>
impl<W: Debug> Debug for AnsiWriter<W>
source§impl<W: Hash> Hash for AnsiWriter<W>
impl<W: Hash> Hash for AnsiWriter<W>
source§impl<W: PartialEq> PartialEq for AnsiWriter<W>
impl<W: PartialEq> PartialEq for AnsiWriter<W>
source§fn eq(&self, other: &AnsiWriter<W>) -> bool
fn eq(&self, other: &AnsiWriter<W>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<W: Write> Write for AnsiWriter<W>
impl<W: Write> Write for AnsiWriter<W>
source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn write_all(&mut self, buf: &[u8]) -> Result<()>
fn write_all(&mut self, buf: &[u8]) -> Result<()>
Attempts to write an entire buffer into this writer. Read more
source§fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>
fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>
Writes a formatted string into this writer, returning any error
encountered. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)source§impl<W: Write> Write for AnsiWriter<W>
impl<W: Write> Write for AnsiWriter<W>
impl<W: Eq> Eq for AnsiWriter<W>
impl<W> StructuralPartialEq for AnsiWriter<W>
Auto Trait Implementations§
impl<W> RefUnwindSafe for AnsiWriter<W>where
W: RefUnwindSafe,
impl<W> Send for AnsiWriter<W>where
W: Send,
impl<W> Sync for AnsiWriter<W>where
W: Sync,
impl<W> Unpin for AnsiWriter<W>where
W: Unpin,
impl<W> UnwindSafe for AnsiWriter<W>where
W: UnwindSafe,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.