mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-03 21:08:18 +00:00
Add type checking for parameter inputs (#1045)
This commit is contained in:
parent
98f172414a
commit
a993938d80
4 changed files with 41 additions and 33 deletions
|
@ -51,7 +51,7 @@ where
|
|||
core::any::type_name::<Self::Output>()
|
||||
}
|
||||
#[cfg(feature = "alloc")]
|
||||
fn to_node_io(&self, parameters: Vec<Type>) -> NodeIOTypes {
|
||||
fn to_node_io(&self, parameters: Vec<(Type, Type)>) -> NodeIOTypes {
|
||||
NodeIOTypes {
|
||||
input: concrete!(<Input as StaticType>::Static),
|
||||
output: concrete!(<Self::Output as StaticType>::Static),
|
||||
|
|
|
@ -9,11 +9,11 @@ pub use std::borrow::Cow;
|
|||
pub struct NodeIOTypes {
|
||||
pub input: Type,
|
||||
pub output: Type,
|
||||
pub parameters: Vec<Type>,
|
||||
pub parameters: Vec<(Type, Type)>,
|
||||
}
|
||||
|
||||
impl NodeIOTypes {
|
||||
pub fn new(input: Type, output: Type, parameters: Vec<Type>) -> Self {
|
||||
pub fn new(input: Type, output: Type, parameters: Vec<(Type, Type)>) -> Self {
|
||||
Self { input, output, parameters }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue