use thiserror::Error;

#[derive(Error, Debug)]
pub enum UtilError {
    #[error("IO Error")]
    IO(#[from] glib::Error),
    #[error("Error (de)serializing an object")]
    Json(#[from] serde_json::Error),
    #[error("Error sending HTTP request")]
    Network(#[from] reqwest::Error),
}

#[derive(Debug, PartialEq, Eq)]
pub struct Elapsed(());

impl Elapsed {
    pub(crate) fn new() -> Self {
        Elapsed(())
    }
}
