#![cfg_attr(not(test), no_std)]
#![doc = include_str!("../README.md")]
extern crate alloc;
mod area;
mod backend;
mod set;
#[cfg(test)]
mod tests;
pub use self::{area::MemoryArea, backend::MappingBackend, set::MemorySet};
#[derive(Debug, Eq, PartialEq, thiserror::Error)]
pub enum MappingError {
#[error("invalid mapping parameter")]
InvalidParam,
#[error("mapping already exists")]
AlreadyExists,
#[error("mapping backend is in a bad state")]
BadState,
#[error("mapping operation requires repair")]
NeedsRepair,
}
pub type MappingResult<T = ()> = Result<T, MappingError>;