2 ms·
What do you mean by "at the cost of type erasure"? Isn't type erasure an attribute of a programming language and not something that a library has control over?
by josephcsible 3y ago
What do you mean by "at the cost of type erasure"? Isn't type erasure an attribute of a programming language and not something that a library has control over?
- aldanor 3y agoIn this case, it means your actual error will be packed and boxed someplace behind a smart pointer, its type will be lost (so you wouldn't be able to match on its specific variants downstream might you want to) but it will be still able to format itself to a string and will comply with std::error::Error trait.