pub enum DdError {
Coded {
code: ErrorCode,
message: String,
context: Option<String>,
},
Io(Error),
}Variants§
Implementations§
Source§impl DdError
impl DdError
pub fn protocol(code: ErrorCode, message: impl Into<String>) -> Self
pub fn with_context(self, ctx: impl Into<String>) -> Self
pub fn code(&self) -> ErrorCode
pub fn retryable(&self) -> bool
pub fn crypto(msg: impl Into<String>) -> Self
pub fn invalid_frame(msg: impl Into<String>) -> Self
Trait Implementations§
Source§impl Error for DdError
impl Error for DdError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for DdError
impl !UnwindSafe for DdError
impl Freeze for DdError
impl Send for DdError
impl Sync for DdError
impl Unpin for DdError
impl UnsafeUnpin for DdError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more