thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allengeorge <>
Subject [GitHub] thrift issue #1147: THRIFT-2945 Add Rust support
Date Wed, 04 Jan 2017 12:59:35 GMT
Github user allengeorge commented on the issue:
    @jsgf For structs it's more involved than it appears - perhaps because of the way I've
chosen to represent them. Here are some factors that cause issues:
    1. I represent `required` fields as bare types (i.e. no `Option` wrapper). This means
that if the user doesn't specify them in the IDL const declaration then `rustc` will fail.
    2. I'm not sure how to handle a case where a user specifies a single struct field in the
IDL const declaration but ignores the others. I *could* conceivably use ".." but (see below)
    3. I currently don't implement a `Defaults` trait for structs. Even if I did generate
one, I'd only do it for structs with all optional or opt-in-req-out fields

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message