How to obtain the diagonal vector of a Diagonal matrix without allocations?

Evidently parent returns this

julia> parent(D)
3:4
1 Like