Disambiguate rustdoc link references
This commit is contained in:
parent
63d30d33e4
commit
b901dac012
|
@ -32,7 +32,7 @@ pub(crate) const TASK_QUEUE_CAPACITY: usize = 512;
|
|||
// TODO: ProcessContext for parameter automation and sending events
|
||||
|
||||
/// General callbacks the plugin can make during its lifetime. This is passed to the plugin during
|
||||
/// [crate::plugin::Plugin::initialize] and as part of [crate::plugin::Plugin::process].
|
||||
/// [crate::plugin::Plugin::initialize()] and as part of [crate::plugin::Plugin::process()].
|
||||
//
|
||||
// # Safety
|
||||
//
|
||||
|
@ -57,7 +57,7 @@ pub trait ProcessContext {
|
|||
}
|
||||
|
||||
/// Callbacks the plugin can make while handling its GUI, such as updating parameter values. This is
|
||||
/// passed to the plugin during [crate::plugin::Plugin::create_editor].
|
||||
/// passed to the plugin during [crate::plugin::Plugin::create_editor()].
|
||||
//
|
||||
// # Safety
|
||||
//
|
||||
|
|
|
@ -37,7 +37,7 @@ pub(crate) struct LinuxEventLoop<T, E> {
|
|||
/// queue.
|
||||
main_thread_id: ThreadId,
|
||||
|
||||
/// A thread that act as our worker thread. When [do_maybe_async] is called, this thread will be
|
||||
/// A thread that act as our worker thread. When [Self::do_maybe_async()] is called, this thread will be
|
||||
/// woken up to execute the task on the executor. This is wrapped in an `Option` so the thread
|
||||
/// can be taken out of it and joined when this struct gets dropped.
|
||||
worker_thread: Option<JoinHandle<()>>,
|
||||
|
|
|
@ -29,7 +29,7 @@ pub use serde_json::to_string as serialize_field;
|
|||
/// Describes a struct containing parameters and other persistent fields. The idea is that we can
|
||||
/// have a normal struct containing [super::FloatParam] and other parameter types with attributes
|
||||
/// assigning a unique identifier to each parameter. We can then build a mapping from those
|
||||
/// parameter IDs to the parameters using the [Params::param_map] function. That way we can have
|
||||
/// parameter IDs to the parameters using the [Params::param_map()] function. That way we can have
|
||||
/// easy to work with JUCE-style parameter objects in the plugin without needing to manually
|
||||
/// register each parameter, like you would in JUCE.
|
||||
///
|
||||
|
@ -54,13 +54,13 @@ pub trait Params {
|
|||
|
||||
/// Serialize all fields marked with `#[persist = "stable_name"]` into a hash map containing
|
||||
/// JSON-representations of those fields so they can be written to the plugin's state and
|
||||
/// recalled later. This uses [serialize_field] under the hood.
|
||||
/// recalled later. This uses [serialize_field()] under the hood.
|
||||
fn serialize_fields(&self) -> HashMap<String, String>;
|
||||
|
||||
/// Restore all fields marked with `#[persist = "stable_name"]` from a hashmap created by
|
||||
/// [Self::serialize_fields]. All of thse fields should be wrapped in a [PersistentField] with
|
||||
/// [Self::serialize_fields()]. All of thse fields should be wrapped in a [PersistentField] with
|
||||
/// thread safe interior mutability, like an `RwLock` or a `Mutex`. This gets called when the
|
||||
/// plugin's state is being restored. This uses [deserialize_field] under the hood.
|
||||
/// plugin's state is being restored. This uses [deserialize_field()] under the hood.
|
||||
fn deserialize_fields(&self, serialized: &HashMap<String, String>);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ pub enum Range<T> {
|
|||
/// The values are uniformly distributed between `min` and `max`.
|
||||
Linear { min: T, max: T },
|
||||
/// The range is skewed by a factor. Values above 1.0 will make the end of the range wider,
|
||||
/// while values between 0 and 1 will skew the range towards the start. Use [Range::skew_factor]
|
||||
/// while values between 0 and 1 will skew the range towards the start. Use [Range::skew_factor()]
|
||||
/// for a more intuitively way to calculate the skew factor where positive values skew the range
|
||||
/// towards the end while negative values skew the range toward the start.
|
||||
Skewed { min: T, max: T, factor: f32 },
|
||||
|
|
|
@ -72,7 +72,7 @@ impl<T: Default> Smoother<T> {
|
|||
Default::default()
|
||||
}
|
||||
|
||||
/// Whether calling [Self::next] will yield a new value or an old value. Useful if you need to
|
||||
/// Whether calling [Self::next()] will yield a new value or an old value. Useful if you need to
|
||||
/// recompute something wheenver this parameter changes.
|
||||
pub fn is_smoothing(&self) -> bool {
|
||||
self.steps_left > 0
|
||||
|
|
|
@ -41,7 +41,7 @@ pub fn midi_note_to_freq(pitch: u8) -> f32 {
|
|||
2.0f32.powf((pitch as f32 - 69.0) / 12.0) * 440.0
|
||||
}
|
||||
|
||||
/// A version of [std::thread::Builder::spawn_unchecked] that works on the stable compiler.
|
||||
/// A version of [std::thread::Builder::spawn_unchecked()] that works on the stable compiler.
|
||||
/// Implementation courtesy of Yandros on the Rust Discord.
|
||||
pub(crate) trait ThreadSpawnUnchecked {
|
||||
unsafe fn spawn_unchecked_2<F, R>(self, f: F) -> std::io::Result<std::thread::JoinHandle<R>>
|
||||
|
|
|
@ -36,8 +36,8 @@ pub(crate) struct State {
|
|||
/// parmaeter automation though, depending on how the host impelments that.
|
||||
pub params: HashMap<String, ParamValue>,
|
||||
/// Arbitrary fields that should be persisted together with the plugin's parameters. Any field
|
||||
/// on the [Params] struct that's annotated with `#[persist = "stable_name"]` will be persisted
|
||||
/// this way.
|
||||
/// on the [crate::param::internals::Params] struct that's annotated with `#[persist =
|
||||
/// "stable_name"]` will be persisted this way.
|
||||
///
|
||||
/// The individual fields are also serialized as JSON so they can safely be restored
|
||||
/// independently of the other fields.
|
||||
|
|
|
@ -66,7 +66,7 @@ pub fn strlcpy(dest: &mut [c_char], src: &str) {
|
|||
dest[copy_len] = 0;
|
||||
}
|
||||
|
||||
/// The same as [strlcpy], but for VST3's fun UTF-16 strings instead.
|
||||
/// The same as [strlcpy()], but for VST3's fun UTF-16 strings instead.
|
||||
pub fn u16strlcpy(dest: &mut [TChar], src: &str) {
|
||||
if dest.is_empty() {
|
||||
return;
|
||||
|
|
|
@ -72,7 +72,7 @@ macro_rules! check_null_ptr {
|
|||
};
|
||||
}
|
||||
|
||||
/// The same as [check_null_ptr], but with a custom message.
|
||||
/// The same as [check_null_ptr!], but with a custom message.
|
||||
macro_rules! check_null_ptr_msg {
|
||||
($msg:expr, $ptr:expr $(, $ptrs:expr)* $(, )?) => {
|
||||
if $ptr.is_null() $(|| $ptrs.is_null())* {
|
||||
|
|
Loading…
Reference in a new issue