mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-02 12:50:54 +00:00
16 lines
387 B
Rust
16 lines
387 B
Rust
use std::io;
|
|
|
|
#[derive(thiserror::Error, Debug)]
|
|
pub enum Error {
|
|
#[error("kernel error")]
|
|
Kernel(#[from] nix::errno::Errno),
|
|
#[error("io issue encountered")]
|
|
Io(#[from] io::Error),
|
|
#[error("failed to read structure")]
|
|
StructureReadFailed,
|
|
#[error("mmap failed: {0}")]
|
|
MmapFailed(nix::errno::Errno),
|
|
}
|
|
|
|
pub type Result<T> = std::result::Result<T, Error>;
|