Lines Matching refs:Error
2 use crate::error::Error;
4 type Result<T> = std::result::Result<T, util::Error>;
65 return Err(Error::UnexpectedEndOfBuffer { in marshal_to()
95 return Err(Error::UnexpectedEndOfBuffer { in unmarshal()
115 _ => Err(Error::InvalidChannelType(b0).into()), in unmarshal()
167 return Err(Error::UnexpectedEndOfBuffer { in marshal_to()
193 return Err(Error::UnexpectedEndOfBuffer { in unmarshal()
208 return Err(Error::UnexpectedEndOfBuffer { in unmarshal()
251 if let Some(&Error::InvalidChannelType(0x11)) = err.downcast_ref::<Error>() { in test_channel_type_unmarshal_invalid()
257 Error::InvalidMessageType(0x01) in test_channel_type_unmarshal_invalid()
269 if let Some(&Error::UnexpectedEndOfBuffer { in test_channel_type_unmarshal_unexpected_end_of_buffer()
272 }) = err.downcast_ref::<Error>() in test_channel_type_unmarshal_unexpected_end_of_buffer()
279 Error::InvalidMessageType(0x01) in test_channel_type_unmarshal_unexpected_end_of_buffer()
343 if let Some(&Error::InvalidChannelType(0x11)) = err.downcast_ref::<Error>() { in test_channel_open_unmarshal_invalid_channel_type()
349 Error::InvalidMessageType(0x01) in test_channel_open_unmarshal_invalid_channel_type()
361 if let Some(&Error::UnexpectedEndOfBuffer { in test_channel_open_unmarshal_unexpected_end_of_buffer()
364 }) = err.downcast_ref::<Error>() in test_channel_open_unmarshal_unexpected_end_of_buffer()
371 Error::InvalidMessageType(0x01) in test_channel_open_unmarshal_unexpected_end_of_buffer()
389 if let Some(&Error::UnexpectedEndOfBuffer { in test_channel_open_unmarshal_unexpected_length_mismatch()
392 }) = err.downcast_ref::<Error>() in test_channel_open_unmarshal_unexpected_length_mismatch()
399 Error::InvalidMessageType(0x01) in test_channel_open_unmarshal_unexpected_length_mismatch()