doc/wg/network/notes/network-notes-2023-11-16.md
dyn types. Downsides: needs vtables which is more flash and slower speed. Also can't have features like associated trait methods, or methods that don't take a self parameter. Might make some of the features tricky to implement.dyn type to another. That does seem to work.dyn reference and pass it to the lower layer. But, if we have a static mutable reference, and take a static mutable dyn reference, we lose the information of the original reference, and we can't reconstruct the original type.dyn, is that we can't have a "pass buffer back" which goes from dyn back to the original type. So using trait objects works generally for our scenario. And it works for changing headroom and passing down. What doesn't work with trait objects right now is taking the buffer and converting it to its original types. Especially with static references to these buffers.dyn reference. But we eventually do need to get back to the original type at some point to release the slice.capture() function which can claim a buffer and give out a dyn reference. And a horribly unsafe restore() function which takes a reference and gives back a buffer. What we're trying to do is that whenever we do a cast from type to trait object, we need to save the original type somewhere.