Skip to main content

ax_std/io/
mod.rs

1//! Traits, helpers, and type definitions for core I/O functionality.
2
3mod stdio;
4
5pub use ax_io::{BufRead, BufReader, Error, Read, Seek, SeekFrom, Write, prelude};
6
7#[doc(hidden)]
8pub use self::stdio::__print_impl;
9pub use self::stdio::{Stdin, StdinLock, Stdout, StdoutLock, stdin, stdout};
10
11/// A specialized [`Result`] type for I/O operations.
12///
13/// This type is broadly used across [`ax_std::io`] for any operation which may
14/// produce an error.
15///
16/// This typedef is generally used to avoid writing out [`io::Error`] directly and
17/// is otherwise a direct mapping to [`Result`].
18///
19/// While usual Rust style is to import types directly, aliases of [`Result`]
20/// often are not, to make it easier to distinguish between them. [`Result`] is
21/// generally assumed to be [`std::result::Result`][`Result`], and so users of this alias
22/// will generally use `io::Result` instead of shadowing the [prelude]'s import
23/// of [`std::result::Result`][`Result`].
24///
25/// [`ax_std::io`]: crate::io
26/// [`io::Error`]: Error
27pub type Result<T> = ax_io::Result<T>;