October 2019
Intermediate to advanced
444 pages
10h 37m
English
Overloading is a very simple concept—so simple, in fact, that it's hard to find usable examples that can't be done using a sufficiently complex function. However, in this recipe, we think that we have come up with something useful.
In step 2, we created a wrapper around println! and similar functions that allow writing to standard streams such as standard output and standard error, or any other arbitrary stream type, with only a token to make the difference. There are a few interesting details to this implementation outside of this as well:
Read now
Unlock full access