humfmt 0.2.0

Ergonomic human-readable formatting toolkit for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use core::fmt;

#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct NegativeDurationError;

impl fmt::Display for NegativeDurationError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        f.write_str("negative durations are not supported by this formatter")
    }
}

#[cfg(feature = "std")]
impl std::error::Error for NegativeDurationError {}