Introspection
Term.Introspection.get_docstringTerm.Introspection.get_methods_with_docstringsTerm.Introspection.inspectTerm.Introspection.typestree
Term.Introspection.get_docstring — Method
get_docstring(obj)Extract and style an object's docstring.
Term.Introspection.get_methods_with_docstrings — Method
get_methods_with_docstrings(obj::Union{Union, DataType, Function})Get the docstring for each method for an object (function/datatype).
Term.Introspection.inspect — Method
inspect(T::Union{Union, DataType})Inspect a DataType to show info such as docstring, constructors and methods.
Term.Introspection.typestree — Method
typestree(T)
typestree(io::IO, T)Returns the type hierarchy for T in a pretty format. This is done using colors, indentation and unicode for maximal readability. The output included all supertypes, and one level of subtypes.
This function is not exported, so to use it you need to use the Term.typestree syntax, or import it manually by import Term: typestree
Example
Below is an example showing the type tree for Integer. Note that the colors of the output are not included in this docstring.
julia> Term.typestree(Integer)
╭─────────────────────────────────────── Types hierarchy ───╮
│ ┬ │
│ ├─ Base.MultiplicativeInverses.MultiplicativeInverse ⇒ │
│ ├─ Complex ⇒ │
│ └─ Real ⇒ ┬ │
│ ├─ Rational ⇒ │
│ ├─ AbstractIrrational ⇒ │
│ ├─ Integer ⇒ ┬ │
│ │ ├─ Signed ⇒ │
│ │ ├─ Unsigned ⇒ │
│ │ └─ Bool ⇒ │
│ └─ AbstractFloat ⇒ │
│ │
╰───────────────────────────────────────────────────────────╯