• Home
  • Raw
  • Download

Lines Matching refs:ProtobufError

11 pub type ProtobufResult<T> = Result<T, ProtobufError>;
58 pub enum ProtobufError { enum
72 impl ProtobufError { implementation
75 pub fn message_not_initialized(message: &'static str) -> ProtobufError { in message_not_initialized() argument
76 ProtobufError::MessageNotInitialized { message: message } in message_not_initialized()
80 impl fmt::Display for ProtobufError { implementation
84 &ProtobufError::IoError(ref e) => write!(f, "IO error: {}", e), in fmt()
85 &ProtobufError::WireError(ref e) => fmt::Display::fmt(e, f), in fmt()
86 &ProtobufError::Utf8(ref e) => write!(f, "{}", e), in fmt()
87 &ProtobufError::MessageNotInitialized { .. } => write!(f, "not all message fields set"), in fmt()
92 impl Error for ProtobufError { implementation
97 &ProtobufError::IoError(ref e) => e.description(), in description()
98 &ProtobufError::WireError(ref e) => match *e { in description()
110 &ProtobufError::Utf8(ref e) => &e.description(), in description()
111 &ProtobufError::MessageNotInitialized { .. } => "not all message fields set", in description()
117 &ProtobufError::IoError(ref e) => Some(e), in cause()
118 &ProtobufError::Utf8(ref e) => Some(e), in cause()
119 &ProtobufError::WireError(..) => None, in cause()
120 &ProtobufError::MessageNotInitialized { .. } => None, in cause()
125 impl From<io::Error> for ProtobufError { implementation
127 ProtobufError::IoError(err) in from()
131 impl From<str::Utf8Error> for ProtobufError { implementation
133 ProtobufError::Utf8(err) in from()
137 impl From<ProtobufError> for io::Error {
138 fn from(err: ProtobufError) -> Self { in from()
140 ProtobufError::IoError(e) => e, in from()
141 ProtobufError::WireError(e) => { in from()
142 io::Error::new(io::ErrorKind::InvalidData, ProtobufError::WireError(e)) in from()
144 ProtobufError::MessageNotInitialized { message: msg } => io::Error::new( in from()
146 ProtobufError::MessageNotInitialized { message: msg }, in from()