Struct coap::message::response::CoAPResponse
source · pub struct CoAPResponse {
pub message: Packet,
}
Fields
message: Packet
Implementations
sourceimpl CoAPResponse
impl CoAPResponse
pub fn new(request: &Packet) -> Option<CoAPResponse>
pub fn set_status(&mut self, status: Status)
pub fn get_status(&self) -> &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 moresourceimpl Debug for CoAPResponse
impl Debug for CoAPResponse
sourceimpl IsMessage for CoAPResponse
impl IsMessage for CoAPResponse
fn get_message(&self) -> &Packet
fn get_mut_message(&mut self) -> &mut Packet
fn get_header(&self) -> &Header
fn get_mut_header(&mut self) -> &mut Header
fn set_token(&mut self, token: Vec<u8>)
fn get_token(&self) -> &Vec<u8> ⓘ
fn set_option(&mut self, tp: CoAPOption, value: LinkedList<Vec<u8>>)
fn set_payload(&mut self, payload: Vec<u8>)
fn add_option(&mut self, tp: CoAPOption, value: Vec<u8>)
fn get_option(&self, tp: CoAPOption) -> Option<&LinkedList<Vec<u8>>>
fn clear_option(&mut self, tp: CoAPOption)
fn set_observe(&mut self, value: Vec<u8>)
fn get_observe(&self) -> Option<&Vec<u8>>
fn get_message_id(&self) -> u16
fn set_message_id(&mut self, message_id: u16)
fn set_version(&mut self, v: u8)
fn get_version(&self) -> u8
fn set_type(&mut self, t: MessageType)
fn get_type(&self) -> MessageType
fn get_code(&self) -> String
fn set_code(&mut self, code: &str)
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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