From 68fd00f8f8fdefdf5bbc442113fc47b48e4748df Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sun, 17 May 2020 20:55:42 +0200 Subject: Add info about struct-like enum matches to main crate docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- askama/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/askama/src/lib.rs b/askama/src/lib.rs index 1aa21be..24ee6b3 100644 --- a/askama/src/lib.rs +++ b/askama/src/lib.rs @@ -332,6 +332,11 @@ //! matches (`(val)`), optionally introduced with a variant name. The //! `else` block is equivalent to matching on `_` (matching anything). //! +//! Struct-like enum variants are supported from version 0.8, with the list +//! of matches surrounded by curly braces instead (`{ field }`). New names +//! for the fields can be specified after a colon in the list of matches +//! (`{ field: val }`). +//! //! ### Include //! //! The *include* statement lets you split large or repetitive blocks into -- cgit