Documenting elements of a struct

I have no idea if there’s a better/canonical way, but I’ve done something like this in the past:

"""
This is an `X`

# Fields
- a: First letter of the English alphabet
- b: Second letter of the English alphabet
- c: C is for cookie
"""
struct X
    a::String
    b::Char
    c
end

This may be really frowned upon though, I don’t know :grin:

4 Likes