kxio/src/result.rs
Paul Campbell 17c1b4ff6d
All checks were successful
Rust / build (map[name:nightly]) (push) Successful in 2m12s
Rust / build (map[name:stable]) (push) Successful in 4m14s
Release Please / Release-plz (push) Successful in 1m23s
feat: add kxio::Result;
2024-11-09 08:02:50 +00:00

14 lines
406 B
Rust

//
use derive_more::{Display, From};
/// Represents a error accessing the file system or network.
#[derive(Debug, From, Display)]
pub enum Error {
Fs(#[from] crate::fs::Error),
Net(#[from] crate::net::Error),
Reqwest(#[from] reqwest::Error),
}
impl std::error::Error for Error {}
/// Represents a success or a failure using `fs` or `net`.
pub type Result<T> = core::result::Result<T, Error>;