Struct StderrLock

struct StderrLock<'a> { ... }

A locked reference to the Stderr handle.

This handle implements the Write trait and is constructed via the Stderr::lock method. See its documentation for more.

Note: Windows Portability Considerations

When operating in a console, the Windows implementation of this stream does not support non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return an error.

In a process with a detached console, such as one using #![windows_subsystem = "windows"], or in a child process spawned from such a process, the contained handle will be null. In such cases, the standard library's Read and Write will do nothing and silently succeed. All other I/O operations, via the standard library or via raw Windows API calls, will fail.

Implementations

impl Debug for StderrLock<'_>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl IsTerminal for StderrLock<'_>

fn is_terminal(self: &Self) -> bool

impl RefUnwindSafe for StderrLock<'_>

impl StdioExt for StderrLock<'_>

fn set_fd<T: Into<OwnedFd>>(self: &mut Self, fd: T) -> Result<()>
fn take_fd(self: &mut Self) -> Result<OwnedFd>
fn replace_fd<T: Into<OwnedFd>>(self: &mut Self, replace_with: T) -> Result<OwnedFd>

impl UnwindSafe for StderrLock<'_>

impl Write for StderrLock<'_>

fn write(self: &mut Self, buf: &[u8]) -> Result<usize>
fn write_vectored(self: &mut Self, bufs: &[IoSlice<'_>]) -> Result<usize>
fn is_write_vectored(self: &Self) -> bool
fn flush(self: &mut Self) -> Result<()>
fn write_all(self: &mut Self, buf: &[u8]) -> Result<()>
fn write_all_vectored(self: &mut Self, bufs: &mut [IoSlice<'_>]) -> Result<()>

impl<'a> AsFd for StderrLock<'a>

fn as_fd(self: &Self) -> BorrowedFd<'_>

impl<'a> AsHandle for StderrLock<'a>

fn as_handle(self: &Self) -> BorrowedHandle<'_>

impl<'a> AsRawFd for StderrLock<'a>

fn as_raw_fd(self: &Self) -> RawFd

impl<'a> AsRawHandle for StderrLock<'a>

fn as_raw_handle(self: &Self) -> RawHandle

impl<'a> Freeze for StderrLock<'a>

impl<'a> Send for StderrLock<'a>

impl<'a> Sync for StderrLock<'a>

impl<'a> Unpin for StderrLock<'a>

impl<'a> UnsafeUnpin for StderrLock<'a>

impl<T> Any for StderrLock<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for StderrLock<'a>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for StderrLock<'a>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for StderrLock<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for StderrLock<'a>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for StderrLock<'a>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for StderrLock<'a>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>