1 2 3 4 5 6 7 8 9 10 11 12 13
/// Represents an error that occur during parsing. #[derive(thiserror::Error, Debug)] #[error("ads.txt parse error: {0}")] pub struct Error(&'static str); impl From<&'static str> for Error { fn from(s: &'static str) -> Self { Error(s) } } /// Wrapper for the `Result` type with an [`Error`](struct.Error.html). pub type Result<T> = std::result::Result<T, Error>;