pub(crate) trait SingleSpeaker {
// Required method
fn speak(&self);
}Expand description
Part 4: Monomorphic dispatch via a generic function.
The compiler monomorphizes direct_speak for each concrete type it is
called with, so the call to speak is resolved statically at compile
time (no vtable, no indirection) - analogous to Java calling a method on
a final class through a concrete reference.