3 ms·
I've seen dynamic dispatch mentioned twice. What do you mean? Isn't that just `fn foo() -> Box<dyn Future<...>>`?
by pitaj 3y ago
I've seen dynamic dispatch mentioned twice. What do you mean? Isn't that just `fn foo() -> Box<dyn Future<...>>`?
- gdcbe 3y agoDynamic dispatch is where you call a method on a Box<dyn T> type, where T is a trait. Cfr: https://doc.rust-lang.org/1.8.0/book/trait-objects.html https://doc.rust-lang.org/1.8.0/book/trait-objects.html This in contrast to generics which is static.