A Struct that can read/write itself from/to IO-like objects