Enums

The examples show this abbreviation in a docstring, with the source it renders from.

DocStringExtensions.INSTANCES — Constant

An Abbreviation that lists the instances of an enum with their values. It supports enums defined with @enum, and with @enumx from EnumX.jl, whose instances it qualifies with the enum's module name. It prints nothing for other objects.

Examples

julia> """
       A fruit.
       $(INSTANCES)
       """
       @enum Fruit apple banana = 3 cherry

julia> @doc Fruit
  A fruit.

    •  apple = 0
    •  banana = 3
    •  cherry = 4
source