pub struct NeverTerminalWriter<Inner: Write> { /* private fields */ }
Expand description
A wrapper around a Write
which implements WriteTerminal
but isn’t ever
a terminal.
Implementations§
Source§impl<Inner: Write> NeverTerminalWriter<Inner>
impl<Inner: Write> NeverTerminalWriter<Inner>
Sourcepub fn into_inner(self) -> Inner
pub fn into_inner(self) -> Inner
Consume self
and return the inner stream.
Trait Implementations§
Source§impl<Inner: Write + AsHandleOrSocket> AsHandleOrSocket for NeverTerminalWriter<Inner>
impl<Inner: Write + AsHandleOrSocket> AsHandleOrSocket for NeverTerminalWriter<Inner>
Source§fn as_handle_or_socket(&self) -> BorrowedHandleOrSocket<'_>
fn as_handle_or_socket(&self) -> BorrowedHandleOrSocket<'_>
Like
AsHandle::as_handle
and AsSocket::as_socket
but can return either type.Source§impl<Inner: Write + AsRawHandleOrSocket> AsRawHandleOrSocket for NeverTerminalWriter<Inner>
impl<Inner: Write + AsRawHandleOrSocket> AsRawHandleOrSocket for NeverTerminalWriter<Inner>
Source§fn as_raw_handle_or_socket(&self) -> RawHandleOrSocket
fn as_raw_handle_or_socket(&self) -> RawHandleOrSocket
Like
AsRawHandle::as_raw_handle
and AsRawSocket::as_raw_socket
but can return either type.Source§impl<Inner: Write> Write for NeverTerminalWriter<Inner>
impl<Inner: Write> Write for NeverTerminalWriter<Inner>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. 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§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_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<()>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<()>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Source§impl<Inner: Write> WriteTerminal for NeverTerminalWriter<Inner>
impl<Inner: Write> WriteTerminal for NeverTerminalWriter<Inner>
Source§fn color_support(&self) -> TerminalColorSupport
fn color_support(&self) -> TerminalColorSupport
Test whether this output stream supports color control codes.
Source§fn color_preference(&self) -> bool
fn color_preference(&self) -> bool
Test whether the user has indicated a preference for color output by
default. Respects the
NO_COLOR
environment variable where applicable.Source§fn is_output_terminal(&self) -> bool
fn is_output_terminal(&self) -> bool
Test whether the output is connected to a terminal. Read more
Source§fn color_default(&self) -> bool
fn color_default(&self) -> bool
Test whether color should be used on this terminal by default. This
includes both whether color is supported and whether the user has
not indicated a preference otherwise.
impl<Inner: Write> Terminal for NeverTerminalWriter<Inner>
Auto Trait Implementations§
impl<Inner> Freeze for NeverTerminalWriter<Inner>where
Inner: Freeze,
impl<Inner> RefUnwindSafe for NeverTerminalWriter<Inner>where
Inner: RefUnwindSafe,
impl<Inner> Send for NeverTerminalWriter<Inner>where
Inner: Send,
impl<Inner> Sync for NeverTerminalWriter<Inner>where
Inner: Sync,
impl<Inner> Unpin for NeverTerminalWriter<Inner>where
Inner: Unpin,
impl<Inner> UnwindSafe for NeverTerminalWriter<Inner>where
Inner: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsGrip for Twhere
T: AsHandleOrSocket,
impl<T> AsGrip for Twhere
T: AsHandleOrSocket,
Source§fn as_grip(&self) -> BorrowedHandleOrSocket<'_>
fn as_grip(&self) -> BorrowedHandleOrSocket<'_>
Extracts the grip.
Source§impl<T> AsRawGrip for Twhere
T: AsRawHandleOrSocket,
impl<T> AsRawGrip for Twhere
T: AsRawHandleOrSocket,
Source§fn as_raw_grip(&self) -> RawHandleOrSocket
fn as_raw_grip(&self) -> RawHandleOrSocket
Extracts the raw grip.
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