This branch adds new ErasedSender and ErasedPermit types to
tricky_pipe::mpsc. These types allow senders to reserve channel
capacity for a dynamic type (which may or may not implement Serialize
and DeserializeOwned), and then dynamically downcast the
ErasedPermit back to a concrete type. This allows performing the
asynchronous portion of the send operation (reserving a Permit) in a
non-type-erased context, and using a vtable function to actually send
the message once the async reserve operation has completed.
This branch adds new
ErasedSender
andErasedPermit
types totricky_pipe::mpsc
. These types allow senders to reserve channel capacity for a dynamic type (which may or may not implementSerialize
andDeserializeOwned
), and then dynamically downcast theErasedPermit
back to a concrete type. This allows performing the asynchronous portion of the send operation (reserving aPermit
) in a non-type-erased context, and using a vtable function to actually send the message once the async reserve operation has completed.