Is there an easy way to display a struct definition?
I often find myself wanting to see the fieldnames for a type, for which I can call fieldnames(mytype)
. This doesn’t give me the corresponding types as well. Is there an easy way to say, call @printstruct(typeof(mytype)) and get:
struct MyType
var1::Int
var2::Vector{String}
end
or similar?