[][src]Crate enso_generics

Rust Generics implementation.

Datatype-generic programming, also frequently just called generic programming or generics, is a form of abstraction that allows defining functions that can operate on a large class of data types. For a more in-depth introduction to generic programming in general, have a look at Datatype-Generic Programming, or the Libraries for Generic Programming paper.

Re-exports

pub use generic::*;
pub use hlist::*;
pub use tuple::*;

Modules

generic

Generic representation of data types. Refer to the crate documentation to learn more.

hlist

HList provides many operations to create and manipulate heterogenous lists (HLists) whose length and element types are known at compile-time. HLists can be used to implement records, variants, type-indexed products (TIP), type-indexed co-products (TIC), or keyword arguments.

tuple

This module contains implementations of generic operations on tuples.

Macros

new

Creates new HList from the provided elements, similar to vec!. In order to provide type for the list, use the ty macro. In order to pattern match on it, use the pat macro.

pat

Pattern matches on a HList. See docs of new to learn more.

ty

Smart HList type constructor. See docs of new to learn more.