1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/// Represents any of the ways storing something in Google Cloud Storage can fail #[derive(Debug)] pub struct Error { msg: String, } impl Error { pub(crate) fn new(msg: &str) -> Error { Error { msg: msg.to_string(), } } } impl From<reqwest::Error> for Error { fn from(err: reqwest::Error) -> Self { Self { msg: format!("network error: {}", err), } } }