#![no_std]
mod check;
mod impls;
mod mut_ref;
mod storage;
mod utils;
pub use impls::*;
pub use mut_ref::*;
pub use storage::*;
pub use utils::*;
pub use bitpiece_macros::bitpiece;
pub use const_for::const_for;
pub use paste::paste;
pub trait BitPiece: Copy {
const BITS: usize;
const ZEROES: Self;
const ONES: Self;
const MIN: Self;
const MAX: Self;
type Bits: BitStorage;
type Converter;
fn try_from_bits(bits: Self::Bits) -> Option<Self>;
fn from_bits(bits: Self::Bits) -> Self;
fn to_bits(self) -> Self::Bits;
}
pub trait BitPieceHasMutRef: BitPiece {
type MutRef<'s>: BitPieceMutRef<'s>;
}
pub trait BitPieceHasFields: BitPiece {
type Fields;
fn from_fields(fields: Self::Fields) -> Self;
fn to_fields(self) -> Self::Fields;
}