Skip to main content

ax_io/
lib.rs

1#![doc = include_str!("../README.md")]
2#![cfg_attr(not(doc), no_std)]
3#![feature(core_io_borrowed_buf)]
4#![feature(min_specialization)]
5#![feature(maybe_uninit_fill)]
6#![cfg_attr(not(maybe_uninit_slice), feature(maybe_uninit_slice))]
7#![warn(missing_docs)]
8
9#[cfg(feature = "alloc")]
10extern crate alloc;
11
12#[doc(no_inline)]
13pub use ax_errno::{AxError as Error, AxErrorKind as ErrorKind, AxResult as Result};
14
15/// Default buffer size for I/O operations.
16pub const DEFAULT_BUF_SIZE: usize = 1024 * 2;
17
18mod buffered;
19mod iobuf;
20pub mod prelude;
21mod read;
22mod seek;
23mod utils;
24mod write;
25
26pub use self::{buffered::*, iobuf::*, read::*, seek::*, utils::*, write::*};
27
28/// I/O poll results.
29#[derive(Debug, Default, Clone, Copy)]
30pub struct PollState {
31    /// Object can be read now.
32    pub readable: bool,
33    /// Object can be writen now.
34    pub writable: bool,
35}