[][src]Struct libcoap_sys::coap_opt_iterator_t

#[repr(C)]
pub struct coap_opt_iterator_t {
    pub length: usize,
    pub type_: u16,
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>,
    pub next_option: *mut coap_opt_t,
    pub filter: coap_opt_filter_t,
}

Iterator to run through PDU options. This object must be initialized with coap_option_iterator_init(). Call coap_option_next() to walk through the list of options until coap_option_next() returns @c NULL.

@code coap_opt_t *option; coap_opt_iterator_t opt_iter; coap_option_iterator_init(pdu, &opt_iter, COAP_OPT_ALL);

while ((option = coap_option_next(&opt_iter))) { ... do something with option ... } @endcode

Fields

length: usize

< remaining length of PDU

type_: u16

< decoded option type

_bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>next_option: *mut coap_opt_t

< pointer to the unparsed next option

filter: coap_opt_filter_t

< option filter

Methods

impl coap_opt_iterator_t[src]

pub fn bad(&self) -> c_uint[src]

pub fn set_bad(&mut self, val: c_uint)[src]

pub fn filtered(&self) -> c_uint[src]

pub fn set_filtered(&mut self, val: c_uint)[src]

pub fn new_bitfield_1(
    bad: c_uint,
    filtered: c_uint
) -> __BindgenBitfieldUnit<[u8; 1], u8>
[src]

Trait Implementations

impl Clone for coap_opt_iterator_t[src]

impl Copy for coap_opt_iterator_t[src]

impl Debug for coap_opt_iterator_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.