Struct StdoutLock Copy item path 1.0.0 · Source pub struct StdoutLock<'a> { }Expand description A locked reference to the Stdout handle.
This handle implements the Write trait, and is constructed via
the Stdout::lock method. See its documentation for more.
By default, the handle is line-buffered when connected to a terminal, meaning
it flushes automatically when a newline (\n) is encountered. For immediate
output, you can manually call the flush method. When the handle goes out
of scope, the buffer is automatically flushed.
§ 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.
Formats the value using the given formatter.
Read more Returns
true if the descriptor/handle refers to a terminal/tty.
Read more Writes a buffer into this writer, returning how many bytes were written.
Read more 🔬 This is a nightly-only experimental API. (can_vector)
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination.
Read more Attempts to write an entire buffer into this writer.
Read more 🔬 This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer.
Read more Writes a formatted string into this writer, returning any error
encountered.
Read more Creates a “by reference” adapter for this instance of
Write.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Returns the argument unchanged.
Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer.
Read more Mutably dereferences the given pointer.
Read more Drops the object pointed to by the given pointer.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Writes an unsigned 8 bit integer to the underlying writer.
Read more Writes a signed 8 bit integer to the underlying writer.
Read more Writes an unsigned 16 bit integer to the underlying writer.
Read more Writes a signed 16 bit integer to the underlying writer.
Read more Writes an unsigned 24 bit integer to the underlying writer.
Read more Writes a signed 24 bit integer to the underlying writer.
Read more Writes an unsigned 32 bit integer to the underlying writer.
Read more Writes a signed 32 bit integer to the underlying writer.
Read more Writes an unsigned 48 bit integer to the underlying writer.
Read more Writes a signed 48 bit integer to the underlying writer.
Read more Writes an unsigned 64 bit integer to the underlying writer.
Read more Writes a signed 64 bit integer to the underlying writer.
Read more Writes an unsigned 128 bit integer to the underlying writer.
Writes a signed 128 bit integer to the underlying writer.
Writes an unsigned n-bytes integer to the underlying writer.
Read more Writes a signed n-bytes integer to the underlying writer.
Read more Writes an unsigned n-bytes integer to the underlying writer.
Read more Writes a signed n-bytes integer to the underlying writer.
Read more Writes a IEEE754 single-precision (4 bytes) floating point number to
the underlying writer.
Read more Writes a IEEE754 double-precision (8 bytes) floating point number to
the underlying writer.
Read more Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it
Write the byte value of the specified reference, converting it to little endianness
Write the byte value of the specified reference, converting it to big endianness
Write the byte value of the specified reference, not converting it