Is it possible to make a type generic over a global actor? Essentially, I'm trying to create something that looks like this...
@Isolation
final class Store<State, Action, Isolation: GlobalActor> {
//...
}
typealias MainStore = Store<State, Action, MainActor>
This way, I could create a Store
that is guaranteed to run on the main actor, but I could also, say, make a Store
that's guaranteed to be isolated to a global database actor.
Is this or something similar possible?