pub enum ZnpError {
Down(String),
NoReply,
Timeout {
subsystem: u8,
id: u8,
},
Rpc {
subsystem: u8,
id: u8,
code: u8,
},
Status {
subsystem: u8,
id: u8,
status: u8,
},
Decode(DecodeError),
Frame(FrameError),
Unsupported {
product: u8,
major: u8,
minor: u8,
maint: u8,
},
}Expand description
Client errors.
Variants§
Down(String)
The port closed or failed.
NoReply
Nothing answered SYS_PING.
Timeout
No response in time.
Rpc
The NCP does not know the command.
Fields
Status
The command returned a failure status.
Decode(DecodeError)
A response did not parse.
Frame(FrameError)
A request did not encode.
Unsupported
The firmware is not Z-Stack 3.
Trait Implementations§
Source§impl Error for ZnpError
impl Error for ZnpError
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<DecodeError> for ZnpError
impl From<DecodeError> for ZnpError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<FrameError> for ZnpError
impl From<FrameError> for ZnpError
Source§fn from(source: FrameError) -> Self
fn from(source: FrameError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ZnpError
impl RefUnwindSafe for ZnpError
impl Send for ZnpError
impl Sync for ZnpError
impl Unpin for ZnpError
impl UnsafeUnpin for ZnpError
impl UnwindSafe for ZnpError
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