From 938d273d4291f242a6718cd4849d55b8ef04b9b7 Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Tue, 24 Dec 2019 23:20:11 +0000 Subject: [PATCH] Document feature flags --- docs/4-features.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/4-features.md b/docs/4-features.md index 11d599a..5ebc637 100644 --- a/docs/4-features.md +++ b/docs/4-features.md @@ -4,6 +4,22 @@ title: Feature Flags nav_order: 5 --- -# Feature Flags +# Feature Flags and Optional Dependencies -Feature flags that can be enabled.. \ No newline at end of file +Some functionality can be selectively enabled/disabled via [Cargo features](https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section). These can be enabled when you add Schemars to your crate's cargo.toml, e.g. +```toml +[dependencies] +schemars = { version = "0.6", features = ["chrono"] } +``` + +
+ +### derive_json_schema + +Implements `JsonSchema` on Schemars types themselves. + +### chrono + +Implements `JsonSchema` on all [Chrono](https://github.com/chronotope/chrono) types which are serializable by Serde. + +