Struct coap_lite::CoapResponse
source · pub struct CoapResponse {
pub message: Packet,
}
Expand description
The CoAP response.
Fields§
§message: Packet
Implementations§
source§impl CoapResponse
impl CoapResponse
sourcepub fn new(request: &Packet) -> Option<CoapResponse>
pub fn new(request: &Packet) -> Option<CoapResponse>
Creates a new response.
sourcepub fn set_status(&mut self, status: Status)
pub fn set_status(&mut self, status: Status)
Sets the status.
sourcepub fn get_status(&self) -> &Status
pub fn get_status(&self) -> &Status
Returns the status.
Trait Implementations§
source§impl Clone for CoapResponse
impl Clone for CoapResponse
source§fn clone(&self) -> CoapResponse
fn clone(&self) -> CoapResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for CoapResponse
impl RefUnwindSafe for CoapResponse
impl Send for CoapResponse
impl Sync for CoapResponse
impl Unpin for CoapResponse
impl UnwindSafe for CoapResponse
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