Rather than accepting MoveResolver by reference accept it by value, but provide generic implementations for references of types that implement the traits. Also expose a reference to it on Session and return it by value on finish.
This allows for the creation of resolvers that hold state that is scoped to the session, internally to themselves, rather than relying on that state's lifetime being maintained externally.
Rather than accepting
MoveResolver
by reference accept it by value, but provide generic implementations for references of types that implement the traits. Also expose a reference to it onSession
and return it by value onfinish
.This allows for the creation of resolvers that hold state that is scoped to the session, internally to themselves, rather than relying on that state's lifetime being maintained externally.
Test Plan