At some point this should be an RFC to include in Rust proper. Maybe with different names for the structs?