Skip to main content

gpui_kit/structured/
mod.rs

1//! Structured data a host hands over: a value tree, and a form generated from
2//! a description of one.
3//!
4//! Neither surface takes a serialization dependency. [`JsonValue`] and
5//! [`Schema`] are the smallest shapes that express what has to be drawn, and a
6//! host converts into them from whatever crate it already parses with. That
7//! keeps this crate product-neutral in the way `SplitLayout` already is: the
8//! records are plain, and choosing a format stays the host's decision.
9//!
10//! Both refuse to be quiet about what they cannot show. A value that is
11//! withheld reads as withheld rather than as absent, and a schema field the
12//! form cannot draw is reported in place of the control rather than dropped.
13
14pub mod json_view;
15pub mod schema_form;
16
17pub use json_view::{JsonValue, JsonView, ValueKind};
18pub use schema_form::{
19    FieldValue, NumberBounds, Schema, SchemaChoice, SchemaField, SchemaForm, SchemaFormEvent,
20    SchemaKind, UnrenderableField,
21};