oct 0.25.0

Octonary transcodings.
Documentation
// Copyright 2024-2025 Gabriel Bjørnager Jensen.
//
// This Source Code Form is subject to the terms of
// the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you
// can obtain one at:
// <https://mozilla.org/MPL/2.0/>.

//! Input/output facilities.
//!
//! This module is fundamentally a port of
//! [`std::io`]. It additionally provides the
//! [`Serialise`] and [`Deserialise`] traits.
//!
#![cfg_attr(not(feature = "std"), doc = "[`std::io`]: <https://doc.rust-lang.org/nightly/std/io/index.html>")]
//!
//! Note that all ported items are only provided on
//! a bare bones basis; implementing the entirety of
//! `std::io` would either be massively inefficient
//! or extremely overcomplicated due to the extra
//! leverage that internal crates get (that we
//! wouldn't without a nightly compiler). See
//! [#48331] for information on the official port
//! into [`alloc`] and [`core`].
//!
//! [#48331]: <https://github.com/rust-lang/rust/issues/48331>
#![cfg_attr(not(feature = "alloc"), doc = "[`alloc`]: <https://doc.rust-lang.org/nightly/alloc/index.html>")]

mod bytes;
mod cursor;
mod deserialise;
mod empty;
mod error;
mod error_kind;
mod read;
mod seek;
mod seek_from;
mod serialise;
mod sink;
mod write;

pub use bytes::Bytes;
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 seek::Seek;
pub use seek_from::SeekFrom;
pub use serialise::Serialise;
pub use sink::{Sink, sink};
pub use write::Write;

/// An input/output result.
///
/// Equivalent to
/// <code>[core::result::Result]&lt;T, [Error]&gt;</code>.
pub type Result<T> = core::result::Result<T, Error>;