pub struct NodeInfo {
node_id: NodeId,
inputs: Vec<&'static str>,
atoms: Vec<&'static str>,
outputs: Vec<&'static str>,
input_help: Vec<&'static str>,
output_help: Vec<&'static str>,
node_help: &'static str,
node_desc: &'static str,
node_name: &'static str,
norm_v: Rc<dyn Fn(usize, f32) -> f32>,
denorm_v: Rc<dyn Fn(usize, f32) -> f32>,
}
Expand description
Holds information about the node type that was allocated. It stores the names of inputs, output and atoms for uniform access.
The crate::NodeConfigurator allocates and holds instances of this type for access by NodeId. See also crate::NodeConfigurator::node_by_id and crate::Matrix::info_for.
Fields
node_id: NodeId
inputs: Vec<&'static str>
atoms: Vec<&'static str>
outputs: Vec<&'static str>
input_help: Vec<&'static str>
output_help: Vec<&'static str>
node_help: &'static str
node_desc: &'static str
node_name: &'static str
norm_v: Rc<dyn Fn(usize, f32) -> f32>
denorm_v: Rc<dyn Fn(usize, f32) -> f32>
Implementations
sourceimpl NodeInfo
impl NodeInfo
sourcepub fn from_node_id(nid: NodeId) -> Self
pub fn from_node_id(nid: NodeId) -> Self
Allocates a new NodeInfo from a NodeId. Usually you access NodeInfo in the UI thread via crate::NodeConfigurator::node_by_id or crate::Matrix::info_for.
sourceimpl NodeInfo
impl NodeInfo
pub fn from(s: &str) -> Self
pub fn name(&self) -> &'static str
pub fn in_name(&self, in_idx: usize) -> Option<&'static str>
pub fn at_name(&self, in_idx: usize) -> Option<&'static str>
pub fn out_name(&self, out_idx: usize) -> Option<&'static str>
pub fn in_help(&self, in_idx: usize) -> Option<&'static str>
pub fn out_help(&self, out_idx: usize) -> Option<&'static str>
pub fn norm(&self, in_idx: usize, x: f32) -> f32
pub fn denorm(&self, in_idx: usize, x: f32) -> f32
pub fn desc(&self) -> &'static str
pub fn help(&self) -> &'static str
pub fn out_count(&self) -> usize
pub fn in_count(&self) -> usize
pub fn at_count(&self) -> usize
pub fn to_id(&self) -> NodeId
pub fn default_output(&self) -> Option<u8>
pub fn default_input(&self) -> Option<u8>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for NodeInfo
impl !Send for NodeInfo
impl !Sync for NodeInfo
impl Unpin for NodeInfo
impl !UnwindSafe for NodeInfo
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