metricus_agent 0.0.16

Low latency metrics framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::fmt::Display;
use thiserror::Error;

pub type Result<T> = core::result::Result<T, Error>;

#[derive(Error, Debug)]
pub enum Error {
    #[error("IO error: {0}")]
    IO(#[from] std::io::Error),
    #[error("other error: {0}")]
    Other(String),
}

impl Error {
    pub fn other<T: Display>(msg: T) -> Self {
        Self::Other(msg.to_string())
    }
}