Given an RPC that expects a state type 'a
, it can use a state type 'b
if we
tell it how to extract an 'a
from it. Note that this extraction is done on every
RPC call, so should be cheap and should not copy mutable state that you want to
persist across calls.