Closed nbigaouette closed 4 years ago
I tried to move the documentation
and annotation
fields toType
.
While it seems possible to go down that route, it might not be as useful as I though. For example rustdoc will not build doc for tuple struct fields (see https://github.com/rust-lang/rust/issues/42615).
Yes, using a Vec<String>
makes sense for documentation and annotation. I'll change those.
@nbigaouette ping. Any chance we can get this landed?
Wow, that slipped my mind, sorry! :D
I've replaced the Field.annotation
to a Vec<String>
for multi-line annotation in 6e17dc2.
I guess something similar could be done for the Field.documentation
?
Poke again :-D
Any news?
Poke? Would be really great if this could get merged
@carllerche Would have been awesome to have this in, as I was going to create an issue.
I really like this lib, but if it's abandoned, a short note on the README would be handy.
Another ping here, can we get this merged?
This PR adds two fields to the
Field
struct to set a struct field's documentation and annotation.The
Field
type must bepub
to be created outside of the crate.A
Struct::push_field()
function is added to add the manually created field to the struct.I also split
Fields::named()
intonamed()
andpush_named()
(see 6093af4) to be able to reuse the latter.This PR is a work in progress. I haven't added the modification to tuple fields since their content is a different type (
Type
instead ofField
). I'd like to make sure this is a proper path before continuing. Maybe the doc and annotation could go inside theType
instead?Should close #3 and #4.