Module Rpc.Implementation

module Implementation: sig .. end

type 'connection_state t 
A 'connection_state t is something which knows how to respond to one query, given a 'connection_state. That is, you can create a 'connection_state t by providing a function which takes a query *and* a 'connection_state and provides a response.

The reason for this is that rpcs often do something like look something up in a master structure. This way, Implementation.t's can be created without having the master structure in your hands.

module Description: sig .. end
val description : 'a t -> Description.t
val lift : 'a t -> f:('b -> 'a) -> 'b t
We may want to use an 'a t implementation (perhaps provided by someone else) in a 'b t context. We can do this as long as we can map our state into the state expected by the original implementer.