unsafe fn map_deser<RD>(
umsg: UserRequest<'_>,
req_tx: &ErasedKProducer,
user_resp: &MpscProducer,
service_id: ServiceId,
client_id: ClientId,
) -> Result<(), UserHandlerError>where
RD: RegisteredDriver,
RD::Request: Serialize + DeserializeOwned,
RD::Response: Serialize + DeserializeOwned,
Expand description
A monomorphizable function that allows us to store the serialization type within the function itself, allowing for a type-erased function pointer to be stored inside of the registry.
SAFETY:
This function MUST be called with a RegisteredDriver
type matching the type
used to create the ErasedKProducer
.