Type Alias riot_sys::gcoap_link_encoder_t

source ·
pub type gcoap_link_encoder_t = Option<unsafe extern "C" fn(resource: *const coap_resource_t, buf: *mut c_char, maxlen: size_t, context: *mut coap_link_encoder_ctx_t) -> ssize_t>;
Expand description

@brief Handler function to write a resource link

@param[in] resource Resource for link @param[out] buf Buffer on which to write; may be null @param[in] maxlen Remaining length for @p buf @param[in] context Contextual information on what/how to write

@return count of bytes written to @p buf (or writable if @p buf is null) @return -1 on error

Aliased Type§

enum gcoap_link_encoder_t {
    None,
    Some(unsafe extern "C" fn(_: *const coap_resource_t, _: *mut u8, _: u32, _: *mut coap_link_encoder_ctx_t) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *const coap_resource_t, _: *mut u8, _: u32, _: *mut coap_link_encoder_ctx_t) -> i32)

Some value of type T.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 4 bytes

Size for each variant:

  • None: 0 bytes
  • Some: 4 bytes