Struct StandardStream
struct StandardStream { ... }
Satisfies io::Write and WriteColor, and supports optional coloring
to either of the standard output streams, stdout and stderr.
Implementations
impl StandardStream
fn stdout(choice: ColorChoice) -> StandardStreamCreate a new
StandardStreamwith the given color preferences that writes to standard output.On Windows, if coloring is desired and a Windows console could not be found, then ANSI escape sequences are used instead.
The specific color/style settings can be configured when writing via the
WriteColortrait.fn stderr(choice: ColorChoice) -> StandardStreamCreate a new
StandardStreamwith the given color preferences that writes to standard error.On Windows, if coloring is desired and a Windows console could not be found, then ANSI escape sequences are used instead.
The specific color/style settings can be configured when writing via the
WriteColortrait.fn lock(self: &Self) -> StandardStreamLock<'_>Lock the underlying writer.
The lock guard returned also satisfies
io::WriteandWriteColor.This method is not reentrant. It may panic if
lockis called while aStandardStreamLockis still alive.
impl Debug for StandardStream
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Freeze for StandardStream
impl RefUnwindSafe for StandardStream
impl Send for StandardStream
impl Sync for StandardStream
impl Unpin for StandardStream
impl UnwindSafe for StandardStream
impl Write for StandardStream
fn write(self: &mut Self, b: &[u8]) -> io::Result<usize>fn flush(self: &mut Self) -> io::Result<()>
impl WriteColor for StandardStream
fn supports_color(self: &Self) -> boolfn supports_hyperlinks(self: &Self) -> boolfn set_color(self: &mut Self, spec: &ColorSpec) -> io::Result<()>fn set_hyperlink(self: &mut Self, link: &HyperlinkSpec<'_>) -> io::Result<()>fn reset(self: &mut Self) -> io::Result<()>fn is_synchronous(self: &Self) -> bool
impl<T> Any for StandardStream
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for StandardStream
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for StandardStream
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for StandardStream
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for StandardStream
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for StandardStream
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for StandardStream
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>