std-function
stdout: standard output handle
Standard output carries ordinary program results. A lock can group writes through one handle; explicit flush is appropriate when a prompt must become visible. This example writes a fixed record. Expected stdout (not executed): ready Common mistake: Mixing diagnostics into structured stdout output.
Formal Syntax & Structure
rust syntaxrust
std::io::stdout() -> Stdout; stdout.lock()Working Example
Example Snippetrust
fn main() { use std::io::{self, Write}; let mut out = io::stdout().lock(); writeln!(out, "ready").unwrap(); out.flush().unwrap();}