pub unsafe extern "C" fn attribute_pre_init<T: PluginAPI<E>, E: PluginError + 'static>(
plugin_data: *const PluginData,
id: size_t,
pre_init: *mut c_char,
) -> c_intExpand description
Indicates whether an attribute may be set before initialization.
This function accepts a pointer to a c_char. If the char is ATTRIBUTE_PRE_INIT_FALSE after the function returns and it returns a value of PLUGIN_OK, then the attribute that corresponds to the provided ID may not be set before plugin initialization. If the char is any value other than 0 and the function returns PLUGIN_OK, then the plugin may be set before initialization.
If the function does not return PLUGIN_OK, then the value stored at pre_init will not be modified.
§Safety
This function is unsafe because it dereferences raw pointers.
§Arguments
plugin_data- A pointer to a PluginData structid- The id of the attributepre_init- A value that determines whether the attribute’s value may be set before the plugin is initialized