Lines Matching refs:Error
3 use thiserror::Error;
5 pub type Result<T> = std::result::Result<T, Error>;
7 #[derive(Debug, Error, PartialEq)]
9 pub enum Error { enum
24 Util(#[from] util::Error),
26 Sctp(#[from] sctp::Error),
35 impl From<Error> for util::Error { implementation
36 fn from(e: Error) -> Self { in from()
37 util::Error::from_std(e) in from()
41 impl From<Error> for io::Error { implementation
42 fn from(error: Error) -> Self { in from()
44 e @ Error::Sctp(sctp::Error::ErrEof) => { in from()
45 io::Error::new(io::ErrorKind::UnexpectedEof, e.to_string()) in from()
47 e @ Error::ErrStreamClosed => { in from()
48 io::Error::new(io::ErrorKind::ConnectionAborted, e.to_string()) in from()
50 e => io::Error::new(io::ErrorKind::Other, e.to_string()), in from()
55 impl PartialEq<util::Error> for Error { implementation
56 fn eq(&self, other: &util::Error) -> bool { in eq()
57 if let Some(down) = other.downcast_ref::<Error>() { in eq()
64 impl PartialEq<Error> for util::Error { implementation
65 fn eq(&self, other: &Error) -> bool { in eq()
66 if let Some(down) = self.downcast_ref::<Error>() { in eq()