[−][src]Struct libcoap_sys::coap_pdu_t
structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload marker (0xff), then the payload if stored inline. Memory layout is: <---header--->|<---token---><---options--->0xff<---payload---> header is addressed with a negative offset to token, its maximum size is max_hdr_size. options starts at token + token_length payload starts at data, its length is used_size - (data - token)
Fields
type_: u8
< message type
code: u8
< request method (value 1--10) or response code (value 40-255)
max_hdr_size: u8
< space reserved for protocol-specific header
hdr_size: u8
< actaul size used for protocol-specific header
token_length: u8
< length of Token
tid: u16
< transaction id, if any, in regular host byte order
max_delta: u16
< highest option number
alloc_size: usize
< allocated storage for token, options and payload
used_size: usize
< used bytes of storage for token, options and payload
max_size: usize
< maximum size for token, options and payload, or zero for variable size pdu
token: *mut u8
< first byte of token, if any, or options
data: *mut u8
< first byte of payload, if any
Trait Implementations
impl Clone for coap_pdu_t
[src]
fn clone(&self) -> coap_pdu_t
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for coap_pdu_t
[src]
impl Debug for coap_pdu_t
[src]
Auto Trait Implementations
impl RefUnwindSafe for coap_pdu_t
impl !Send for coap_pdu_t
impl !Sync for coap_pdu_t
impl Unpin for coap_pdu_t
impl UnwindSafe for coap_pdu_t
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,