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