Did you know that in its default configuration, TcpStream uses Nagle's Algorithm to schedule packet sends (https://en.wikipedia.org/wiki/Nagle%27s_algorithm), which can introduce unfortunate latency spikes. If you're particularly latency sensitive, consider calling TcpStream::set_nodelay(true)
Did you know that the
Formatter
argument toDebug::fmt
makes it really easy to customize debug representations for structs, enums, lists, and sets? See thedebug_*
methods on it and