<p>You can also use "3s", then int.from_bytes. Strangely, the need for finer control of struct members has never come up, I guess this is the legacy of C. </p>