pub struct CoapError {
pub code: Option<ResponseType>,
pub message: String,
}Expand description
Error type which can be converted to a crate::app::Response as a convenience for allowing
Rust’s ? operator to work naturally in handler code without violating the protocol by
failing to respond to requests.
Fields§
§code: Option<ResponseType>§message: StringImplementations§
Trait Implementations§
Source§impl Error for CoapError
impl Error for CoapError
1.30.0 · 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<HandlingError> for CoapError
impl From<HandlingError> for CoapError
Source§fn from(src: HandlingError) -> Self
fn from(src: HandlingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CoapError
impl RefUnwindSafe for CoapError
impl Send for CoapError
impl Sync for CoapError
impl Unpin for CoapError
impl UnwindSafe for CoapError
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