From 83b26a1467359d0aeff50e8dd6eb7a558829f42a Mon Sep 17 00:00:00 2001 From: dima-starosud Date: Tue, 4 Jul 2023 14:46:18 +0300 Subject: [PATCH] Document frunk_core dependency requirement for [Labelled]Generic (#219) --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index f8dab12f..43cfaa9d 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,15 @@ assert_eq!(remainder, hlist![true]); `Generic` is a way of representing a type in ... a generic way. By coding around `Generic`, you can to write functions that abstract over types and arity, but still have the ability to recover your original type afterwards. This can be a fairly powerful thing. +#### Setup + +In order to derive the trait `Generic` (or `LabelledGeneric`) you will have to add `frunk_core` dependency + +```toml +[dependencies] +frunk_core = { version = "$version" } +``` + Frunk comes out of the box with a nice custom `Generic` derivation so that boilerplate is kept to a minimum. Here are some examples: