pub struct NodeInstance {}
Expand description
A NodeInstance describes the input/output/atom ports of a Node and holds other important house keeping information for the NodeConfigurator.
Fields
id: NodeId
node: Node
in_use: bool
prog_idx: usize
out_start: usize
out_end: usize
in_start: usize
in_end: usize
at_start: usize
at_end: usize
mod_start: usize
mod_end: usize
in2mod_map: [Option<usize>; 32]
A mapping array, to map from input index of the node to the modulator index. Because not every input has an associated modulator. This is used later to send GraphMessage::ModamtUpdate. The input index into this array is the index returned from routines like NodeId::inp_param.
Implementations
sourceimpl NodeInstance
impl NodeInstance
pub fn new(id: NodeId, node: Node) -> Self
pub fn mark_used(&mut self)
pub fn is_used(&self) -> bool
pub fn as_op(&self) -> NodeOp
pub fn mod_in_local2global(&self, idx: u8) -> Option<usize>
pub fn in_local2global(&self, idx: u8) -> Option<usize>
pub fn out_local2global(&self, idx: u8) -> Option<usize>
pub fn set_index(&mut self, idx: usize) -> &mut Self
pub fn set_output(&mut self, s: usize, e: usize) -> &mut Self
pub fn set_input(&mut self, s: usize, e: usize) -> &mut Self
pub fn set_mod(&mut self, s: usize, e: usize) -> &mut Self
sourcepub fn set_mod_idx(&mut self, idx: usize, i: usize) -> &mut Self
pub fn set_mod_idx(&mut self, idx: usize, i: usize) -> &mut Self
Sets the modulator index mapping: idx
is the
index of the parameter like in NodeId::inp_param_by_idx,
and i
is the absolute index of the modulator that belongs
to this parameter.
pub fn set_atom(&mut self, s: usize, e: usize) -> &mut Self
Trait Implementations
sourceimpl Clone for NodeInstance
impl Clone for NodeInstance
sourcefn clone(&self) -> NodeInstance
fn clone(&self) -> NodeInstance
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl !RefUnwindSafe for NodeInstance
impl Send for NodeInstance
impl Sync for NodeInstance
impl Unpin for NodeInstance
impl !UnwindSafe for NodeInstance
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more