You need to implement the 3-arg show
. Continuing from @CameronBieganek’s MWE:
julia> function Base.show(io::IO, ::MIME"text/plain", d::Dict{Int64, Foo})
println(io, "A dictionary containing ", length(d), " items.")
end
julia> d
A dictionary containing 1 items.