Type Alias uct_am_callback_t

Source
pub type uct_am_callback_t = Option<unsafe extern "C" fn(arg: *mut c_void, data: *mut c_void, length: size_t, flags: c_uint) -> ucs_status_t>;
Expand description

@ingroup UCT_AM @brief Callback to process incoming active message

When the callback is called, @a flags indicates how @a data should be handled. If @a flags contain @ref UCT_CB_PARAM_FLAG_DESC value, it means @a data is part of a descriptor which must be released later by @ref uct_iface_release_desc by the user if the callback returns @ref UCS_INPROGRESS.

@param [in] arg User-defined argument. @param [in] data Points to the received data. This may be a part of a descriptor which may be released later. @param [in] length Length of data. @param [in] flags Mask with @ref uct_cb_param_flags

@note This callback could be set and released by @ref uct_iface_set_am_handler function.

@retval UCS_OK - descriptor was consumed, and can be released by the caller. @retval UCS_INPROGRESS - descriptor is owned by the callee, and would be released later. Supported only if @a flags contain @ref UCT_CB_PARAM_FLAG_DESC value. Otherwise, this is an error.

Aliased Type§

enum uct_am_callback_t {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: *mut c_void, _: u32, _: u32) -> ucs_status_t),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *mut c_void, _: u32, _: u32) -> ucs_status_t)

Some value of type T.