pub enum ColumnKind {
Text,
Integer,
Real,
Boolean,
Enum(Vec<String>),
Opaque,
}Expand description
One column’s type, normalized from the JSON Schema shape the Tables
module publishes for it (crates/tables/src/json_schema.rs). The
shapes are closed: the module emits exactly these, so anything else
reads as ColumnKind::Opaque rather than as a guess.
Variants§
Text
{"type": "string"} — with optional minLength/maxLength, an
optional format of "email" or "uri", and the not/pattern
ban on U+0000. A timestamp (format: "date-time") and a uuid
(format: "uuid") normalize here too: the wire type is a string
either way.
Integer
{"type": "integer"}, with optional minimum/maximum.
Real
{"type": "number"}, with optional minimum/maximum.
Boolean
{"type": "boolean"}.
Enum(Vec<String>)
A closed list of literals ("enum"), their JSON text forms, with
the null member left out — nullability lives on
ColumnModel::nullable.
Opaque
The schema names no type at all: the json column’s own shape
(“any JSON value”, nothing to narrow), or a shape this generator
cannot read. TypeScript gets unknown, and the wire gets no
filter, because equality on the incomparable is a lie.
Trait Implementations§
Source§impl Clone for ColumnKind
impl Clone for ColumnKind
Source§impl Debug for ColumnKind
impl Debug for ColumnKind
impl Eq for ColumnKind
Source§impl PartialEq for ColumnKind
impl PartialEq for ColumnKind
impl StructuralPartialEq for ColumnKind
Auto Trait Implementations§
impl Freeze for ColumnKind
impl RefUnwindSafe for ColumnKind
impl Send for ColumnKind
impl Sync for ColumnKind
impl Unpin for ColumnKind
impl UnsafeUnpin for ColumnKind
impl UnwindSafe for ColumnKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.