Type Alias riot_sys::sock_udp_cb_t

source ·
pub type sock_udp_cb_t = Option<unsafe extern "C" fn(sock: *mut sock_udp_t, flags: sock_async_flags_t, arg: *mut c_void)>;
Expand description

@brief Event callback for @ref sock_udp_t

@pre (sock != NULL)

@note Only applicable with @ref SOCK_HAS_ASYNC defined.

@param[in] sock The sock the event happened on @param[in] flags The event flags. Expected values are - @ref SOCK_ASYNC_MSG_RECV, - @ref SOCK_ASYNC_MSG_SENT, - @ref SOCK_ASYNC_PATH_PROP, or - a combination of them. @param[in] arg Argument provided when setting the callback using @ref sock_udp_set_cb(). May be NULL.

Aliased Type§

enum sock_udp_cb_t {
    None,
    Some(unsafe extern "C" fn(_: *mut sock_udp, _: u8, _: *mut c_void)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut sock_udp, _: u8, _: *mut c_void))

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