Skip to main content

Crate dicebear_schema

Crate dicebear_schema 

Source
Expand description

DiceBear JSON Schema definitions, embedded at compile time.

This is a pure-data crate. It mirrors the npm (@dicebear/schema), Composer (dicebear/schema), PyPI (dicebear-schema), Go and pub.dev (dicebear_schema) packages: the same source schemas under src/, with no logic. Consumers parse and validate (e.g. with the jsonschema crate); this crate only ships the bytes.

Unlike npm — which serves the minified dist/ over the browser — Rust embeds the JSON into the binary and parses it at runtime, so the unminified src/ files are used directly, matching the Python, PHP, Go and Dart packages.

Constants§

DEFINITION
definition.json — JSON Schema for DiceBear style definition files.
OPTIONS
options.json — JSON Schema for DiceBear avatar options.

Functions§

all
Names of every embedded schema ("definition", "options").
get
Returns the raw JSON for the named schema ("definition" or "options"), or None if the name is unknown.