pub struct InstrumentTopologyModule {
pub id: NodeId,
pub kind: Symbol,
pub inputs: Vec<InstrumentTopologyJack>,
pub outputs: Vec<InstrumentTopologyJack>,
pub settings: Vec<(Symbol, Expr)>,
pub raw_view: Vec<(Symbol, Expr)>,
}Expand description
One module in an instrument spec: a node kind with input/output jacks, settings, and an opaque raw view.
Fields§
§id: NodeIdThe module’s node id.
kind: SymbolThe module kind (becomes the node verb/class symbol).
inputs: Vec<InstrumentTopologyJack>Input jacks (lowered to input ports).
outputs: Vec<InstrumentTopologyJack>Output jacks (lowered to output ports).
settings: Vec<(Symbol, Expr)>Module settings, lowered to a settings node option map.
raw_view: Vec<(Symbol, Expr)>Opaque module state, lowered to a raw-view node option map.
Implementations§
Source§impl InstrumentTopologyModule
impl InstrumentTopologyModule
Sourcepub fn new(id: impl Into<NodeId>, kind: Symbol) -> Self
pub fn new(id: impl Into<NodeId>, kind: Symbol) -> Self
Starts a module with the given id and kind.
Sourcepub fn with_input(self, jack: InstrumentTopologyJack) -> Self
pub fn with_input(self, jack: InstrumentTopologyJack) -> Self
Adds an input jack, returning the updated module.
Sourcepub fn with_output(self, jack: InstrumentTopologyJack) -> Self
pub fn with_output(self, jack: InstrumentTopologyJack) -> Self
Adds an output jack, returning the updated module.
Sourcepub fn with_setting(self, key: Symbol, value: Expr) -> Self
pub fn with_setting(self, key: Symbol, value: Expr) -> Self
Adds a setting, returning the updated module.
Trait Implementations§
Source§impl Clone for InstrumentTopologyModule
impl Clone for InstrumentTopologyModule
Source§fn clone(&self) -> InstrumentTopologyModule
fn clone(&self) -> InstrumentTopologyModule
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 moreAuto Trait Implementations§
impl Freeze for InstrumentTopologyModule
impl RefUnwindSafe for InstrumentTopologyModule
impl Send for InstrumentTopologyModule
impl Sync for InstrumentTopologyModule
impl Unpin for InstrumentTopologyModule
impl UnsafeUnpin for InstrumentTopologyModule
impl UnwindSafe for InstrumentTopologyModule
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