so I was planning to use this for a stack based state machine thing, which requires me to have an ArrrayList or the equivilant, however, if I do
const std = @import("std");
const interface = @import("interface").Interface;
const State = interface(.{
.onEnter = fn(anytype),
// ...
});
const StateManager = struct {
stack: ArrayList(anytype), // error.
}
so I'm wondering how can I store instances of struct? Note, it's not limited to one implementation, I could have a MenuState, A Gameplay state, etc, so having it store anything that implements the State interface is necessary