mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 13:11:31 +00:00
26 lines
760 B
Rust
26 lines
760 B
Rust
use std::io;
|
|
|
|
use tokio::task::JoinError;
|
|
|
|
#[derive(thiserror::Error, Debug)]
|
|
pub enum Error {
|
|
#[error("version of xen is not supported")]
|
|
XenVersionUnsupported,
|
|
#[error("kernel error: {0}")]
|
|
Kernel(#[from] nix::errno::Errno),
|
|
#[error("io issue encountered: {0}")]
|
|
Io(#[from] io::Error),
|
|
#[error("failed to acquire semaphore: {0}")]
|
|
AcquireSemaphoreFailed(#[from] tokio::sync::AcquireError),
|
|
#[error("populate physmap failed")]
|
|
PopulatePhysmapFailed,
|
|
#[error("mmap batch failed: {0}")]
|
|
MmapBatchFailed(nix::errno::Errno),
|
|
#[error("specified value is too long")]
|
|
ValueTooLong,
|
|
#[error("failed to join async task: {0}")]
|
|
JoinError(JoinError),
|
|
}
|
|
|
|
pub type Result<T> = std::result::Result<T, Error>;
|