{"action":"created","issue":{"url":"https://api.github.com/repos/dwrensha/capnpc-rust/issues/18","labels_url":"https://api.github.com/repos/dwrensha/capnpc-rust/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/dwrensha/capnpc-rust/issues/18/comments","events_url":"https://api.github.com/repos/dwrensha/capnpc-rust/issues/18/events","html_url":"https://github.com/dwrensha/capnpc-rust/issues/18","id":87746444,"number":18,"title":"support Cap'n Proto generics","user":{"login":"kali","id":53657,"avatar_url":"https://avatars.githubusercontent.com/u/53657?v=3","gravatar_id":"","url":"https://api.github.com/users/kali","html_url":"https://github.com/kali","followers_url":"https://api.github.com/users/kali/followers","following_url":"https://api.github.com/users/kali/following{/other_user}","gists_url":"https://api.github.com/users/kali/gists{/gist_id}","starred_url":"https://api.github.com/users/kali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kali/subscriptions","organizations_url":"https://api.github.com/users/kali/orgs","repos_url":"https://api.github.com/users/kali/repos","events_url":"https://api.github.com/users/kali/events{/privacy}","received_events_url":"https://api.github.com/users/kali/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-12T14:28:48Z","updated_at":"2015-06-13T11:28:04Z","closed_at":null,"body":"What I'm referring to is the fact that Map(Key,Value) is translated to a pair of unparameterized rust type (one builder, one reader), using \"any_pointer\". It makes it very easy to generate invalid data. I think it would be much nicer to parameterize the Map Builder and Reader so that the right Builder and Reader. It would probably enhance the API safety, and client code readability.\r\n\r\nI suspect this is by-design, but I find it very disturbing when working in rust with its very strict typesystem."},"comment":{"url":"https://api.github.com/repos/dwrensha/capnpc-rust/issues/comments/111701268","html_url":"https://github.com/dwrensha/capnpc-rust/issues/18#issuecomment-111701268","issue_url":"https://api.github.com/repos/dwrensha/capnpc-rust/issues/18","id":111701268,"user":{"login":"kali","id":53657,"avatar_url":"https://avatars.githubusercontent.com/u/53657?v=3","gravatar_id":"","url":"https://api.github.com/users/kali","html_url":"https://github.com/kali","followers_url":"https://api.github.com/users/kali/followers","following_url":"https://api.github.com/users/kali/following{/other_user}","gists_url":"https://api.github.com/users/kali/gists{/gist_id}","starred_url":"https://api.github.com/users/kali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kali/subscriptions","organizations_url":"https://api.github.com/users/kali/orgs","repos_url":"https://api.github.com/users/kali/repos","events_url":"https://api.github.com/users/kali/events{/privacy}","received_events_url":"https://api.github.com/users/kali/received_events","type":"User","site_admin":false},"created_at":"2015-06-13T11:28:04Z","updated_at":"2015-06-13T11:28:04Z","body":"I got the builder to compile too. But it's not usable as is because the specific setters methods for Text and Data (and maybe others) can not be generated in a generic fashion. Do we need  to augment TextBuilder and DataBuilder to support a use case where GenericStruct::Builder<...>.get_[text_field_name]() return a TextBuilder that can reallocate itself?"}}