Struct terminal_io::NeverTerminalWriter
source · 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 + AsFd> AsFd for NeverTerminalWriter<Inner>
impl<Inner: Write + AsFd> AsFd for NeverTerminalWriter<Inner>
source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
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>
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 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> AsFilelike for Twhere
T: AsFd,
impl<T> AsFilelike for Twhere
T: AsFd,
source§fn as_filelike(&self) -> BorrowedFd<'_>
fn as_filelike(&self) -> BorrowedFd<'_>
Borrows the reference. Read more
source§fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target>where
Target: FilelikeViewType,
fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target>where
Target: FilelikeViewType,
Return a borrowing view of a resource which dereferences to a
&Target
. Read moresource§impl<T> AsGrip for Twhere
T: AsFd,
impl<T> AsGrip for Twhere
T: AsFd,
source§fn as_grip(&self) -> BorrowedFd<'_>
fn as_grip(&self) -> BorrowedFd<'_>
Extracts the grip.
source§impl<T> AsRawFilelike for Twhere
T: AsRawFd,
impl<T> AsRawFilelike for Twhere
T: AsRawFd,
source§fn as_raw_filelike(&self) -> i32
fn as_raw_filelike(&self) -> i32
Returns the raw value.
source§impl<T> AsRawGrip for Twhere
T: AsRawFd,
impl<T> AsRawGrip for Twhere
T: AsRawFd,
source§fn as_raw_grip(&self) -> i32
fn as_raw_grip(&self) -> i32
Extracts the raw grip.
source§impl<T> AsRawSocketlike for Twhere
T: AsRawFd,
impl<T> AsRawSocketlike for Twhere
T: AsRawFd,
source§fn as_raw_socketlike(&self) -> i32
fn as_raw_socketlike(&self) -> i32
Returns the raw value.
source§impl<T> AsSocketlike for Twhere
T: AsFd,
impl<T> AsSocketlike for Twhere
T: AsFd,
source§fn as_socketlike(&self) -> BorrowedFd<'_>
fn as_socketlike(&self) -> BorrowedFd<'_>
Borrows the reference.
source§fn as_socketlike_view<Target>(&self) -> SocketlikeView<'_, Target>where
Target: SocketlikeViewType,
fn as_socketlike_view<Target>(&self) -> SocketlikeView<'_, Target>where
Target: SocketlikeViewType,
Return a borrowing view of a resource which dereferences to a
&Target
. Read moresource§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