pub struct BuiltinSig {
pub name: &'static str,
pub params: Vec<ParamType>,
pub signal_outs: usize,
pub kind: BuiltinKind,
pub param_names: Vec<&'static str>,
}Expand description
Type-checker-facing signature of a built-in (independent of T).
Fields§
§name: &'static strRegistered name.
params: Vec<ParamType>Parameter list: first N entries are signal inputs, remainder are compile-time params.
signal_outs: usizeNumber of signal outputs (1 in this increment).
kind: BuiltinKindSample vs block.
param_names: Vec<&'static str>Names of compile-time parameters in params order (after signal inputs).
When non-empty, graph-level build_ir() uses these names to match recipe
params to builtin arg positions — eliminating ordering fragility from
HashMap-based param bags. Left empty for backward-compatible registrations.
Implementations§
Source§impl BuiltinSig
impl BuiltinSig
Sourcepub fn simple(
name: &'static str,
signal_ins: usize,
signal_outs: usize,
num_params: usize,
kind: BuiltinKind,
) -> Self
pub fn simple( name: &'static str, signal_ins: usize, signal_outs: usize, num_params: usize, kind: BuiltinKind, ) -> Self
Convenience constructor for SISO built-ins with only Float params. Maintains backward compatibility during migration.
Sourcepub fn with_names(self, names: Vec<&'static str>) -> Self
pub fn with_names(self, names: Vec<&'static str>) -> Self
Attach human-readable names to compile-time parameters.
names.len() must equal the number of non-signal params in self.params.
When set, graph-level build_ir() in rill-graph uses these names to
match recipe param keys to builtin arg positions, fixing the ordering
fragility of HashMap-based param bags.
Sourcepub fn signal_ins(&self) -> usize
pub fn signal_ins(&self) -> usize
Number of signal inputs = count of Signal params (non-variadic).
Trait Implementations§
Source§impl Clone for BuiltinSig
impl Clone for BuiltinSig
Source§fn clone(&self) -> BuiltinSig
fn clone(&self) -> BuiltinSig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more