Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

External types

Schematic provides schema implementations for third-party crates through a concept known as external types. This functionality is opt-in through Cargo features.

chrono

Requires the type_chrono Cargo feature.

Implements schemas for Date, DateTime, Duration, Days, Months, IsoWeek, NaiveWeek, NaiveDate, NaiveDateTime, and NaiveTime from the chrono crate.

indexmap

Requires the type_indexmap Cargo feature.

Implements a schema for IndexMap and IndexSet from the indexmap crate.

regex

Requires the type_regex Cargo feature.

Implements a schema for Regex from the regex crate.

To use Regex as a setting, reach for RegexSetting, which supplies the Default a required setting needs.

relative-path

Requires the type_relative_path Cargo feature.

Implements schemas for RelativePath and RelativePathBuf from the relative-path crate.

rpkl

Requires the pkl Cargo feature.

Implements a schema for Value from the rpkl crate.

rust_decimal

Requires the type_rust_decimal Cargo feature.

Implements a schema for Decimal from the rust_decimal crate.

semver

Requires the type_semver Cargo feature.

Implements schemas for Version and VersionReq from the semver crate.

To use Version as a setting, reach for VersionSetting, which supplies the Default a required setting needs.

ron

Requires the ron Cargo feature.

Implements a schema for Value from the ron crate.

serde_json

Requires the json Cargo feature.

Implements schemas for Value, Number, and Map from the serde_json crate.

serde_yaml

Requires the serde_yaml Cargo feature on schematic_types directly. The schematic crate does not enable it, as its yaml feature uses serde_norway instead.

Implements schemas for Value, Number, and Mapping from the serde_yaml crate.

serde_yaml_norway

Requires the yaml Cargo feature.

Implements schemas for Value, Number, and Mapping from the serde_norway crate.

toml

Requires the toml Cargo feature.

Implements schemas for Value and Map from the toml crate.

url

Requires the type_url Cargo feature.

Implements a schema for Url from the url crate.

uuid

Requires the type_uuid Cargo feature.

Implements a schema for Uuid from the uuid crate.