mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 02:28:12 +08:00
Remove input from the node definition
This commit is contained in:
@@ -3,24 +3,16 @@
|
||||
|
||||
pub mod generic;
|
||||
pub mod ops;
|
||||
pub mod structural;
|
||||
//pub mod structural;
|
||||
pub mod value;
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub trait Node< 'n, Input> {
|
||||
type Output : 'n;
|
||||
pub trait Node<'n> {
|
||||
type Output: 'n; // TODO: replace with generic associated type
|
||||
|
||||
fn eval(&'n self, input: Input) -> Self::Output;
|
||||
fn eval(&'n self) -> Self::Output;
|
||||
}
|
||||
|
||||
// TODO: Fix exec trait
|
||||
pub trait Exec<'n>: Node<'n, ()> {
|
||||
fn exec(&'n self) -> Self::Output {
|
||||
self.eval(())
|
||||
}
|
||||
}
|
||||
impl<'n, T: Node<'n, ()>> Exec<'n> for T {}
|
||||
|
||||
pub trait Cache {
|
||||
fn clear(&mut self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user