diff --git a/crates/compute_graph/src/rule.rs b/crates/compute_graph/src/rule.rs index 45377b1..9a95971 100644 --- a/crates/compute_graph/src/rule.rs +++ b/crates/compute_graph/src/rule.rs @@ -2,6 +2,7 @@ use crate::node::NodeValue; use crate::NodeId; pub use compute_graph_macros::InputVisitable; use std::cell::{Ref, RefCell}; +use std::future::Future; use std::ops::Deref; use std::rc::Rc; @@ -62,7 +63,7 @@ pub trait AsyncRule: InputVisitable + 'static { /// Asynchronously produces the value of this rule using its inputs. /// /// See [`Rule::evaluate`] for additional details; the same considerations apply. - async fn evaluate(&mut self) -> Self::Output; + fn evaluate(&mut self) -> impl Future + '_; } /// Common supertrait of [`Rule`] and [`AsyncRule`] that defines how rule inputs are visited.