tnnl 0.1.17

tnnl gives you full control over whether and when your IoT devices should be reachable from the internet
//! Custom error for tnnl.
//! Do not use directly.
use std::fmt::Display;

#[derive(Debug)]
pub struct AppError {
    message: String,
}

impl AppError {
    pub(crate) fn new<T: ToString>(message: T) -> Self {
        Self {
            message: message.to_string(),
        }
    }
}

impl Display for AppError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_fmt(format_args!("AppError: {}", self.message))
    }
}