I'm reading the code of
anyhow::Error and I liked that is using a raw vtable. However I'm trying to understand the reason. Couldn't this be implemented with just traits? What are the technical benefits of using a raw vtable instead of traits?
In general I noticed this pattern in other crates too, for example
bytes::Bytes are using raw vtable. Or even
std::task::Waker is using raw vtable.
When this pattern should be used?