It'd be interesting to be able to add (structs' and fields') fields documentation.
For example:
let mut scope = Scope::new(); scope.new_struct("Foo").field("bar", "i64", "This is a `bar`");
could generate:
struct Foo { /// This is a `bar` bar: i64, }
Or maybe a Field type would be useful which could be push_field()ed to a Struct, similarly to Scope::push_struct()?
Field
push_field()
Struct
Scope::push_struct()
👍 I would probably not include the doc string as a third argument as that could get unwieldy.
A push_field would most definitely be useful either way, so we can add doc (and annotation) support to that.
push_field
Activity
carllerche commentedon Jan 5, 2018
👍 I would probably not include the doc string as a third argument as that could get unwieldy.
A
push_fieldwould most definitely be useful either way, so we can add doc (and annotation) support to that.