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: DataTypeThe 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: ValueTypeThe constant value stored in this parameter.
kind: InputParamKindThe input kind. See InputParamKind
node: NodeIdBack-reference to the node containing this parameter.
shown_inline: boolWhen 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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<DataType, ValueType> Freeze for InputParam<DataType, ValueType>
impl<DataType, ValueType> RefUnwindSafe for InputParam<DataType, ValueType>where
DataType: RefUnwindSafe,
ValueType: RefUnwindSafe,
impl<DataType, ValueType> Send for InputParam<DataType, ValueType>
impl<DataType, ValueType> Sync for InputParam<DataType, ValueType>
impl<DataType, ValueType> Unpin for InputParam<DataType, ValueType>
impl<DataType, ValueType> UnsafeUnpin for InputParam<DataType, ValueType>where
DataType: UnsafeUnpin,
ValueType: UnsafeUnpin,
impl<DataType, ValueType> UnwindSafe for InputParam<DataType, ValueType>where
DataType: UnwindSafe,
ValueType: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more