These methods use dynamic scheduling (receive the attribute object &Debugas a parameter):
&Debug
DebugMap::entry
DebugSet::entry
DebugStruct::field
DebugTuple::field
DebugList::entry
These methods use static dispatch and are written in terms of the associated method entry:
entry
DebugMap::entries
DebugSet::entries
DebugList::entries
Why does the first list of methods use dynamic dispatch instead of static dispatch? If static sending has been used, will their use be limited?
Static dispatching uses monomorphization, which creates a separate copy of the code for each particular type.
, , . , .
, ( &Trait).
&Trait
RFC 640, , , . , . , -:
, codegen- Debug impls, Debug , .
, codegen
- Debug impls, Debug , .