Module variant

Module variant 

Source
Expand description

Code common to structs, unions, and enum variants.

Structsยง

RenderedLiteral ๐Ÿ”’
A rendered struct, union, or enum variant, split into fields for actual auto-completion (literal, using field: ()) and display in the completions menu (detail, using field: type).

Functionsยง

format_literal_label ๐Ÿ”’
Format a struct, etc. literal option for display in the completions menu.
format_literal_lookup ๐Ÿ”’
Format a struct, etc. literal option for lookup used in completions filtering.
render_record_lit ๐Ÿ”’
Render a record type (or sub-type) to a RenderedCompound. Use None for the name argument for an anonymous type.
render_tuple_lit ๐Ÿ”’
Render a tuple type (or sub-type) to a RenderedCompound. Use None for the name argument for an anonymous type.
visible_fields ๐Ÿ”’
Find all the visible fields in a given list. Returns the list of visible fields, plus a boolean for whether the list is comprehensive (contains no private fields and its item is not marked #[non_exhaustive]).