pub enum Shape {
}Expand description
What a format looks like: drives an editor’s property grids and pickers, completion, hover docs and the docs’ field tables.
Variants§
Any
Any value.
Bool
true or false.
Int
An integer in min..=max.
Float
A number with a fraction, bits wide (32 or 64): how a frame packs it.
Str
Plain text.
Atom
A name that repeats (crate::Atom): text everywhere, its number in a frame.
Bytes
Bytes as they are.
Ref
A reference of one of kinds (&[]: any kind), written
@kind:id, its id of shape id (text, a number, a uid).
Fields
Named(NamedShape)
A type of the format’s own that tools may know by name (color,
date, money), stored as another shape: a tool that knows the
name shows its own editor, one that doesn’t edits what it’s stored as.
List(fn() -> Shape)
A list of the shape.
Map(fn() -> Shape)
An object of any keys, every value this shape.
Optional(fn() -> Shape)
A value or null.
Struct(StructShape)
A struct: an object of its fields.
Enum(EnumShape)
An enum: a name, or a tagged object.