Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct QuestionError {
- pub kind: QuestionErrorKind,
- pub desc: String,
- }
- #[derive(Debug)]
- pub enum QuestionErrorKind {
- HyperError,
- StdError,
- }
- impl From<HyperError> for QuestionError {
- fn from(err: HyperError) -> QuestionError {
- QuestionError { kind: err, desc: String::from("") }
- }
- }
- impl From<StdError> for QuestionError {
- fn from(err: StdError) -> QuestionError {
- QuestionError { kind: err, desc: String::from("") }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement