pub struct UseInstance {
pub id: String,
pub path: String,
pub overrides: Vec<(String, f64)>,
}Expand description
A file-based subcircuit instance: micamp: use("../sub/ba284.pedal").
Declared inside the components { ... } block. The instance id namespaces
every component/node of the instantiated sub when flattened into the parent.
An optional with { } block overrides specific component values before
flattening:
g1: use("sub/sub_gain.pedal") with { R1: 348k, C1: 8.2n }Fields§
§id: StringInstance identifier (e.g. micamp). Used as the namespace prefix.
path: StringPath to the sub .pedal file, relative to the parent file’s directory.
overrides: Vec<(String, f64)>Optional component-value overrides: (component_id, new_value).
Applied to the sub’s matching ComponentDef before namespacing/merge.
An error is returned if any id has no matching component in the sub.
Trait Implementations§
Source§impl Clone for UseInstance
impl Clone for UseInstance
Source§fn clone(&self) -> UseInstance
fn clone(&self) -> UseInstance
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UseInstance
impl Debug for UseInstance
Source§impl PartialEq for UseInstance
impl PartialEq for UseInstance
Source§fn eq(&self, other: &UseInstance) -> bool
fn eq(&self, other: &UseInstance) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UseInstance
Auto Trait Implementations§
impl Freeze for UseInstance
impl RefUnwindSafe for UseInstance
impl Send for UseInstance
impl Sync for UseInstance
impl Unpin for UseInstance
impl UnsafeUnpin for UseInstance
impl UnwindSafe for UseInstance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more