# Documenting elements of a struct

**URL:** <https://discourse.julialang.org/t/documenting-elements-of-a-struct/64769>\
**Category:** New to Julia\
**Tags:** documenter, struct\
**Created:** [July 16, 2021, 7:32pm UTC](https://discourse.julialang.org/t/documenting-elements-of-a-struct/64769 "2021-07-16T19:32:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mthelm85](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mthelm85/32/224164_2.png) [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Post date:** [July 16, 2021, 8:10pm UTC](https://discourse.julialang.org/t/documenting-elements-of-a-struct/64769/3 "2021-07-16T20:10:39Z")

</div>

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

```julia
"""
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 😁

---

_[View the full topic](https://discourse.julialang.org/t/documenting-elements-of-a-struct/64769)._
