trace4rs-config 0.4.1

trace4rs configuration
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use core::num::ParseIntError;

/// A `trace4rs_config` Result.
pub type Result<T> = std::result::Result<T, Error>;

/// An enum representing the possible errors encountered.
#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("While parsing policy size limit an unexpected unit was encountered: {0}")]
    UnexpectedUnit(String),

    #[error("Policy size overflow (byte size does not fit in u64): {number} {unit}")]
    Overflow { number: u64, unit: String },

    #[error("Failed to parse as an int from the config: {0}")]
    ParseIntError(#[from] ParseIntError),
}