There are several doc pages that have very similar ideas:
and
Whereas the first link shows the expression of a packet's header in terms of the custom U8, the second link use the explicit denotation of the number of bytes (e.g., a u16 is [u8; 2]). In terms of (the sender) writing data to it and copying data therefrom into an outbound stream, which one should I choose? Would this choice differ in the opposite direction wherein information is received and then examined by the receiver?
Goal: super fast byte read/write
Should this be coupled with BytesMut for reading and writing, or would this just be for directly writing to some struct we define (in this case, like a packet header).?
Thanks everyone