In Rust, I represent these as
struct ObjectId([u8; 12]). so far so good. I can initialize an ObjectId using
ObjectId([0x54, 0x3e, 0xf1, 0xf3, 0x80, 0xda, 0x5b, 0x0c, 0x47, 0x63, 0x73, 0xa6])
But what I'd really like is to have a macro that converts "543ef1f380da5b0c476373c1" to [0x54, 0x3e, ...]. I'm pretty sure that this is possible as a procedural macro, but that involves writing a separate crate. Is it possible to write a normal macro that parses out a string to a set of integer constants?