[][src]Function kpal_plugin::attribute_value

pub unsafe extern "C" fn attribute_value<T: PluginAPI<E>, E: PluginError + 'static>(
    plugin_data: *const PluginData,
    id: size_t,
    value: *mut Val,
    phase: Phase
) -> c_int

Writes the value of an attribute to a Value instance that is provided by the caller.

This function returns a status code that indicates whether the operation succeeded and the cause of any possible errors.

Safety

This function is unsafe because it dereferences a raw pointer.

Arguments

  • plugin_data - A pointer to a PluginData struct
  • id - The id of the attribute
  • value - A pointer to a Value enum. The enum is provided by this function's caller.
  • phase - The phase of the plugin lifecycle. This determines what callbacks to use to read the attribute value.