[][src]Crate lark_intern

Macros

intern_tables

Generate a "intern tables" struct that can intern one or more types. Input looks like:

Structs

InternTable

An "intern table" defines a single interner for one key-value pair. They're meant to be grouped into a larger Interners struct, a la crate::ty::TyInterners, that define a series of interners related to some particular area.

Traits

Intern

Trait used for data that can be interned into Interners, giving back a Self::Key type.

InternDirect

Trait for something that is directly interned into an interning table. For example, this might be implemented by String.

Untern

Reverse trait: implemented by the key (crate::ty::Perm) and permits lookup in some Interners struct.

Functions

intern_impl

Helper for Intern implementations: interns data into table, returning the intern key. Note that the data stored in table is of type TableData, which may not be the same as Data -- the convert closure will be used to convert Data into TableData as needed.