kxio 3.2.0

Provides injectable Filesystem and Network resources to make code more testable
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//
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>;