diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2020-05-17 20:55:42 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-05-17 21:45:47 +0200 |
commit | 68fd00f8f8fdefdf5bbc442113fc47b48e4748df (patch) | |
tree | 7159942709e4d9ca37d15542102b6f5e70434ac0 | |
parent | 4abebf55b37d51c4ce56a43445d357ac4f96699e (diff) | |
download | askama-68fd00f8f8fdefdf5bbc442113fc47b48e4748df.tar.gz askama-68fd00f8f8fdefdf5bbc442113fc47b48e4748df.tar.bz2 askama-68fd00f8f8fdefdf5bbc442113fc47b48e4748df.zip |
Add info about struct-like enum matches to main crate docs
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
-rw-r--r-- | askama/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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 |