Skip to main content

Crate typeshift_core

Crate typeshift_core 

Source
Expand description

Core API for typeshift.

This crate defines the TypeShift trait, parse/serialize/schema helpers, and error types used by the facade crate.

Most users should depend on the typeshift facade crate instead of using typeshift-core directly.

Re-exports§

pub use schemars;
pub use serde;
pub use validator;

Enums§

TypeShiftError
Error returned by parse_str.

Traits§

TypeShift
Marker trait for types that can be parsed, validated, and schematized.

Functions§

parse_str
Parse JSON text into T and run validator::Validate.
schema_json
Generate a JSON Schema document for T as serde_json::Value.
to_json
Serialize a typed value into a compact JSON string.