[][src]Struct libcoap_sys::coap_resource_t

#[repr(C)]
pub struct coap_resource_t {
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>,
    pub handler: [coap_method_handler_t; 7],
    pub hh: UT_hash_handle,
    pub link_attr: *mut coap_attr_t,
    pub subscribers: *mut coap_subscription_t,
    pub uri_path: *mut coap_str_const_t,
    pub flags: c_int,
    pub observe: c_uint,
    pub user_data: *mut c_void,
}

Fields

_bitfield_1: __BindgenBitfieldUnit<[u8; 1], u8>handler: [coap_method_handler_t; 7]

Used to store handlers for the seven coap methods @c GET, @c POST, @c PUT, @c DELETE, @c FETCH, @c PATCH and @c IPATCH. coap_dispatch() will pass incoming requests to the handler that corresponds to its request method or generate a 4.05 response if no handler is available.

hh: UT_hash_handlelink_attr: *mut coap_attr_t

< attributes to be included with the link format

subscribers: *mut coap_subscription_t

< list of observers for this resource

uri_path: *mut coap_str_const_t

< the key used for hash lookup for this resource

flags: c_intobserve: c_uint

The next value for the Observe option. This field must be increased each time the resource changes. Only the lower 24 bits are sent.

user_data: *mut c_void

This pointer is under user control. It can be used to store context for the coap handler.

Methods

impl coap_resource_t[src]

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

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

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

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

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

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

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

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

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

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

pub fn new_bitfield_1(
    dirty: c_uint,
    partiallydirty: c_uint,
    observable: c_uint,
    cacheable: c_uint,
    is_unknown: c_uint
) -> __BindgenBitfieldUnit<[u8; 1], u8>
[src]

Trait Implementations

impl Clone for coap_resource_t[src]

impl Copy for coap_resource_t[src]

impl Debug for coap_resource_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.