Open ctiedt opened 1 year ago
Currently blocked by the lack of async trait
in stable Rust. We could work around this by redefining TrackElement
like this:
pub trait TrackElement {
type State: Copy + Default;
fn id(&self) -> &str;
fn state(&self) -> Pin<Box<dyn Future<Output = Self::State>>>;
fn set_state(&mut self, new_state: Self::State) -> Pin<Box<dyn Future<Output = Result<(), TrackElementError>>>>;
}
but that would require a larger rewrite of both track_element
and code_generation
.
In GitLab by @ctiedt on Nov 24, 2022, 11:34