Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created November 28, 2018 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rust-play/0831b83b5706f2dcc68c60ab9c1e43d7 to your computer and use it in GitHub Desktop.
Save rust-play/0831b83b5706f2dcc68c60ab9c1e43d7 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
#[repr(u16)]
pub enum MyEnum {
First = 11,
Unknown = 0,
}
pub fn main() {
println!("{}", MyEnum::First as u16);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment