If I want to make a type in Rust serializable to a String I use
fmt::Display. If I want to serialize it to hex I use
serialize::hex::ToHex, but what trait should I use to convert a type to binary? There is
io::Read but it is targeted at io, it is not as trivial to implement as the others and it is used mostly for io and not for general purpose in the current std.
There are a few types that implement a
into_bytes method, but it is nothing standard: http://doc.rust-lang.org/std/?search=to_bytes