Struct coap_lite::CoapResponse
source · [−]pub struct CoapResponse {
pub message: Packet,
}Expand description
The CoAP response.
Fields
message: PacketImplementations
sourceimpl 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
sourceimpl Clone for CoapResponse
impl Clone for CoapResponse
sourcefn clone(&self) -> CoapResponse
fn clone(&self) -> CoapResponse
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for CoapResponse
impl Send for CoapResponse
impl Sync for CoapResponse
impl Unpin for CoapResponse
impl UnwindSafe for CoapResponse
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more