sf/errors.rs
1use std::error::Error as StdError;
2use std::fmt::{Display, Formatter, Result};
3
4#[derive(Debug, Clone)]
5pub enum Error {
6 ParseError,
7 BytesError(String),
8}
9
10impl Display for Error {
11 fn fmt(&self, f: &mut Formatter) -> Result {
12 write!(f, "Shit!")
13 }
14}
15
16impl StdError for Error {
17 fn description(&self) -> &str {
18 "Shit!"
19 }
20
21 fn cause(&self) -> Option<&StdError> {
22 None
23 }
24}