page_table_generic/
err.rs

1use thiserror::Error;
2
3/// The error type for page table operation failures.
4#[derive(Error, Debug, PartialEq, Eq)]
5pub enum PagingError {
6    #[error("can't allocate memory")]
7    NoMemory,
8    #[error("{0} is not aligned")]
9    NotAligned(&'static str),
10    #[error("not mapped")]
11    NotMapped,
12    #[error("already mapped")]
13    AlreadyMapped,
14}
15
16/// The specialized `Result` type for page table operations.
17pub type PagingResult<T = ()> = Result<T, PagingError>;