pub enum Error {
Failure {
code: ResponseCode,
resp: RawResponse,
msg: Option<String>,
},
Connection(Error),
Deserialization(String),
Utf8(Utf8Error),
}Expand description
All of the ways that a failure can occur within Brokaw
Variants§
Failure
This error indicates an application layer failure.
For example, asking for a non-existent group will return
NoSuchNewsGroup (code 411),
which is not a protocol error.
Connection(Error)
An error raised by the underlying connection
This is usually of an I/O error or a TLS error
Deserialization(String)
An error deserializing a RawResponse into a concrete type
Utf8(Utf8Error)
An error deserializing bytes as UTF-8
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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