brocade 0.1.1

Interface for querying brocade.io products
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::{error::Error, fmt};

#[derive(Debug)]
pub struct ResponseError {
    message: String
}
impl ResponseError {
    pub fn new(message: &str) -> ResponseError {
        ResponseError { message: message.to_string() }
    }
}
impl Error for ResponseError {}
impl fmt::Display for ResponseError {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{}", self.message)
    }
}