1
0
Fork 0

Clarify param_map() docstring

This commit is contained in:
Robbert van der Helm 2022-04-13 20:20:27 +02:00
parent 877eeadc7f
commit 7b24dea719

View file

@ -39,15 +39,16 @@ pub use serde_json::to_string as serialize_field;
/// This implementation is safe when using from the wrapper because the plugin's returned `Params` /// This implementation is safe when using from the wrapper because the plugin's returned `Params`
/// object lives in an `Arc`, and the wrapper also holds a reference to this `Arc`. /// object lives in an `Arc`, and the wrapper also holds a reference to this `Arc`.
pub unsafe trait Params: 'static + Send + Sync { pub unsafe trait Params: 'static + Send + Sync {
/// Create a mapping from unique parameter IDs to parameters along with the name of the /// Create a mapping from unique parameter IDs to parameter pointers along with the name of the
/// group/unit/module they are in. The order of the `Vec` determines the display order in the /// group/unit/module they are in, as a `(param_id, param_ptr, group)` triple. The order of the
/// (host's) generic UI. The group name is either an empty string for top level parameters, or a /// `Vec` determines the display order in the (host's) generic UI. The group name is either an
/// slash/delimited `"Group Name 1/Group Name 2"` path for parameters in nested groups. All /// empty string for top level parameters, or a slash/delimited `"Group Name 1/Group Name 2"` if
/// components of a group path must exist or may encounter panics. The derive macro does this /// this `Params` object contains nested child objects. All components of a group path must
/// for every parameter field marked with `#[id = "stable"]`, and it also inlines all fields /// exist or you may encounter panics. The derive macro does this for every parameter field
/// from child `Params` structs marked with `#[nested = "Group Name"]`, prefixing that group /// marked with `#[id = "stable"]`, and it also inlines all fields from nested child `Params`
/// name before the parameter's originanl group name. Dereferencing the pointers stored in the /// structs marked with `#[nested = "Group Name"]` while prefixing that group name before the
/// values is only valid as long as this object is valid. /// parameter's originanl group name. Dereferencing the pointers stored in the values is only
/// valid as long as this object is valid.
/// ///
/// # Note /// # Note
/// ///