tbytes 0.1.0-alpha1

A tiny library for reading and writing typed data into buffers
Documentation
//! # T-Bytes
//!
//! T-Bytes is a tiny library for reading and writing typed data into bytes buffers. It is designed
//! mainly for `no-std`, `no-alloc` targets or crates which consider to support for `no-std`.
//!
//! # Usage
//!
//! It would be easier to start from an example:
//!
//! ```rust
//! use tbytes::{TBytesReader, TBytesReaderFor};
//!
//! let buffer = [128, 255, 1, 1u8, 1, 255];
//! let reader = TBytesReader::from(buffer.as_slice());
//!
//! // Read byte as `u8`
//! let val: u8 = reader.read().unwrap();
//! assert_eq!(val, 128);
//!
//! // Read byte as `i8`
//! let val: i8 = reader.read().unwrap();
//! assert_eq!(val, -1);
//!
//! // Read two bytes as `u16`  
//! let val: u16 = reader.read().unwrap();
//! assert_eq!(val, 257);
//!
//! // Read two bytes as `u8` array
//! let val: [u8; 2] = reader.read_array().unwrap();
//! assert_eq!(val, [1, 255]);
//! ```
//!
//! # Limitations
//!
//! * We currently supports only numeric types.
//! * At the moment only `little endian` is supported.
#![warn(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]
#![doc(
    html_logo_url = "https://gitlab.com/mavka/libs/t-bytes/-/raw/main/avatar.png?ref_type=heads",
    html_favicon_url = "https://gitlab.com/mavka/libs/t-bytes/-/raw/main/avatar.png?ref_type=heads"
)]
#![cfg_attr(not(feature = "std"), no_std)]

pub mod bytes_reader;
pub use bytes_reader::{TBytesReader, TBytesReaderBackend, TBytesReaderFor};
pub mod bytes_writer;
pub use bytes_writer::{BytesWriterFor, TBytesWriter, TBytesWriterBackend};

pub mod errors;