1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
//! Contains `error_chain` error handling materials error_chain! { types { Error, ErrorKind, ResultExt, ResultChain; } errors { /// Invalid header field value WrongField(cause: String) { description("Wrong value in a header") display("{}", cause) } /// Not enough space in the buffer to read the requested bytes BufferUnderflow(requested: u64, available: u64) { description("Buffer underflow") display("Buffer underflow: {} requested, {} available", requested, available) } } foreign_links { Io(::std::io::Error);// #[doc = "std::io::Error"]; } }