svc_agent/
error.rs

1use std::error::Error as StdError;
2use std::fmt::{self, Display};
3
4#[derive(Debug)]
5pub struct Error(String);
6
7impl Error {
8    pub fn new(detail: &str) -> Self {
9        Self(detail.to_owned())
10    }
11}
12
13impl StdError for Error {}
14
15impl Display for Error {
16    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
17        fmt::Display::fmt(&self.0, fmt)
18    }
19}