[][src]Function kpal_plugin::set_attribute_value

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

Sets the value of an attribute.

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 Val enum. The enum is provided by this function's caller and will be copied.
  • phase - The phase of the plugin lifecycle. This determines what callbacks to use to read the attribute value.