You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'd like to pass a type parameter in the data contained inside states. Here's an example of what I hope to do:
pubstructState<M>{pids:Vec<Pid>,config:WorkerConfig,phantom:PhantomData<M>,}machine!{
#[derive(Clone, Debug, PartialEq)]pubenumWorkerSet<M> {Startup{ state: State<M> }, // This currently complains.Running{ state: State<M> }, // same.}}
I feel the code above is natural seems right. Unfortunately, it looks like the code for the struct representations in each state enum variant end up without the type parameter and so I can't parameterize that type /:
Is there a workaround for this, or am I out of luck?
The text was updated successfully, but these errors were encountered:
Hi, I'd like to pass a type parameter in the data contained inside states. Here's an example of what I hope to do:
I feel the code above is natural seems right. Unfortunately, it looks like the code for the struct representations in each state enum variant end up without the type parameter and so I can't parameterize that type /:
Is there a workaround for this, or am I out of luck?
The text was updated successfully, but these errors were encountered: