pub enum ClientError {
InvalidBody(BodyError),
Serialize,
Frame(EncodeError),
TooLarge {
len: usize,
limit: usize,
},
Rng(RngError),
NotReady,
Failed(WelcomeError),
WrongCommunity,
WrongKind(&'static str),
}Expand description
A command could not be prepared or the session refuses to send it.
Variants§
InvalidBody(BodyError)
The body breaks a state-free rule (§12); nothing was sent.
Serialize
The body or envelope failed to serialise (never expected for this crate’s types).
Frame(EncodeError)
The envelope exceeds its size limit (§12) or cannot be framed (§5).
TooLarge
The envelope exceeds the command limit for its type (§12).
Rng(RngError)
The OS random number generator failed.
NotReady
No verified session.welcome yet: call super::Session::hello and wait (§6.2).
Failed(WelcomeError)
The welcome failed verification; the session MUST NOT send commands (§6.2).
WrongCommunity
community_id differs from the session’s binding (§7.1, WRONG_COMMUNITY).
WrongKind(&'static str)
super::Session::send_signal with a non-signal body, or send with a signal.
Trait Implementations§
Source§impl Clone for ClientError
impl Clone for ClientError
Source§fn clone(&self) -> ClientError
fn clone(&self) -> ClientError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
impl Eq for ClientError
Source§impl Error for ClientError
impl Error for ClientError
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()
Source§impl From<EncodeError> for ClientError
impl From<EncodeError> for ClientError
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Converts to this type from the input type.
Source§impl From<RngError> for ClientError
impl From<RngError> for ClientError
Source§impl PartialEq for ClientError
impl PartialEq for ClientError
impl StructuralPartialEq for ClientError
Auto Trait Implementations§
impl Freeze for ClientError
impl RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
impl UnwindSafe for ClientError
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