tosc-rs / mgnp

MnemOS Global Networking Protocol
Creative Commons Attribution Share Alike 4.0 International
14 stars 1 forks source link

feat(tricky-pipe): add `try_cast` to erased tx/rxs #38

Closed hawkw closed 7 months ago

hawkw commented 7 months ago

This commit adds new SerReceiver::try_cast and DeserSender::try_cast methods, which attempt to recover a typed Receiver or Sender from an erased SerReceiver or DeserSender, respectively. These methods return an error if the requested type does not match the original erased type.