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