#![cfg_attr(not(feature = "std"), doc = "[`std::io`]: <https://doc.rust-lang.org/nightly/std/io/index.html>")]
#![cfg_attr(not(feature = "alloc"), doc = "[`alloc`]: <https://doc.rust-lang.org/nightly/alloc/index.html>")]
#![cfg_attr(feature = "proc_macro", doc = include_str!("serdes_examples.md"))]
mod bytes;
mod _copy;
mod cursor;
mod deserialise;
mod empty;
mod error;
mod error_kind;
mod read;
mod repeat;
mod seek;
mod seek_from;
mod serialise;
mod simple_error;
mod sink;
mod write;
pub use bytes::Bytes;
pub use _copy::copy;
pub use cursor::Cursor;
pub use deserialise::Deserialise;
pub use empty::{Empty, empty};
pub use error::Error;
pub use error_kind::ErrorKind;
pub use read::Read;
pub use repeat::{Repeat, repeat};
pub use seek::Seek;
pub use seek_from::SeekFrom;
pub use serialise::Serialise;
pub use simple_error::SimpleError;
pub use sink::{Sink, sink};
pub use write::Write;
use error::ErrorData;
#[cfg(feature = "alloc")]
use error::CustomError;
#[cfg(feature = "alloc")]
pub use read::read_to_string;
pub type Result<T> = core::result::Result<T, Error>;
#[cfg(feature = "proc_macro")]
#[doc(inline)]
pub use oct_macros::Deserialise;
#[cfg(feature = "proc_macro")]
#[doc(inline)]
pub use oct_macros::Serialise;
const DEFAULT_BUF_SIZE: usize = {
let block_size = 512;
let factor = if cfg!(feature = "std") {
8
} else {
1
};
block_size * factor
};