{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/bitflags/issues/147","repository_url":"https://api.github.com/repos/rust-lang-nursery/bitflags","labels_url":"https://api.github.com/repos/rust-lang-nursery/bitflags/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/bitflags/issues/147/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/bitflags/issues/147/events","html_url":"https://github.com/rust-lang-nursery/bitflags/issues/147","id":286593458,"number":147,"title":"Constants deserialization","user":{"login":"kvark","id":107301,"avatar_url":"https://avatars1.githubusercontent.com/u/107301?v=4","gravatar_id":"","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-01-07T19:42:23Z","updated_at":"2018-02-16T20:32:12Z","closed_at":null,"author_association":"NONE","body":"Currently, serializing any bit flags into a text format isn't exactly readable:\r\n```rust\r\n\t\t\"im-color\": Image(\r\n\t\t\tkind: D2(1, 1, Single),\r\n\t\t\tnum_levels: 1,\r\n\t\t\tformat: Rgba8Unorm,\r\n\t\t\tusage: (bits: 4), // <----\r\n\t\t),\r\n```\r\n\r\nIt would be super useful to support given constants for deserialization (and potentially serialization too?), making this:\r\n```rust\r\n\t\t\tusage: COLOR_ATTACHMENT,\r\n```\r\n\r\nI don't know if it's best to approach this problem within the implementation of `derive(Deserialize)` macro in the rust repo, user-side things like `derivative`, implementation of particular format in use (RON), or by changes in this care. Filing the issue here because bitflags are the strongest example for the case."},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/bitflags/issues/comments/366350248","html_url":"https://github.com/rust-lang-nursery/bitflags/issues/147#issuecomment-366350248","issue_url":"https://api.github.com/repos/rust-lang-nursery/bitflags/issues/147","id":366350248,"user":{"login":"kvark","id":107301,"avatar_url":"https://avatars1.githubusercontent.com/u/107301?v=4","gravatar_id":"","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"created_at":"2018-02-16T20:32:11Z","updated_at":"2018-02-16T20:32:11Z","author_association":"NONE","body":"@alexcrichton @dtolnay need your input here ^"}}
{"actor":{"display_login":"kvark"}}