pub struct InputParam<DataType, ValueType> {
pub id: InputId,
pub typ: DataType,
pub value: ValueType,
pub kind: InputParamKind,
pub node: NodeId,
pub shown_inline: bool,
}
Expand description
An input parameter. Input parameters are inside a node, and represent data
that this node receives. Unlike their OutputParam
counterparts, input
parameters also display an inline widget which allows setting its “value”.
The DataType
generic parameter is used to restrict the range of input
connections for this parameter, and the ValueType
is use to represent the
data for the inline widget (i.e. constant) value.
Fields§
§id: InputId
§typ: DataType
The data type of this node. Used to determine incoming connections. This should always match the type of the InputParamValue, but the property is not actually enforced.
value: ValueType
The constant value stored in this parameter.
kind: InputParamKind
The input kind. See InputParamKind
node: NodeId
Back-reference to the node containing this parameter.
shown_inline: bool
When true, the node is shown inline inside the node graph.
Implementations§
Source§impl<DataType, ValueType> InputParam<DataType, ValueType>
impl<DataType, ValueType> InputParam<DataType, ValueType>
pub fn value(&self) -> &ValueType
pub fn kind(&self) -> InputParamKind
pub fn node(&self) -> NodeId
Trait Implementations§
Source§impl<DataType: Clone, ValueType: Clone> Clone for InputParam<DataType, ValueType>
impl<DataType: Clone, ValueType: Clone> Clone for InputParam<DataType, ValueType>
Source§fn clone(&self) -> InputParam<DataType, ValueType>
fn clone(&self) -> InputParam<DataType, ValueType>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more