pub enum TypeKind {
Enum {
labels: Vec<String>,
},
Composite {
fields: Vec<(String, ColumnTypeName)>,
},
}Expand description
v7.17.0 Phase 1.4 — flavour of the new type. Only ENUM is implemented; the variant set is open so Phase 1.5 (DOMAIN) and later (COMPOSITE, RANGE) can land without an AST shape migration.
v7.37.x (ζ-B Phase 1 composite accept) — added Composite for
CREATE TYPE name AS (field_name field_type, …). Phase 1
stores the field list in the catalog so PG dumps that emit
CREATE TYPE … AS (…) don’t error out; using a composite type
as a column type lands in Phase 2 (Value::Composite encoding +
ROW() literal + field-access syntax).
Variants§
Enum
AS ENUM ('a', 'b', …). Order is preserved (PG enum
labels are ordered).
Composite
AS (field_name field_type, …). Order matters; PG
composite literals are positional.
Fields
§
fields: Vec<(String, ColumnTypeName)>Trait Implementations§
impl Eq for TypeKind
impl StructuralPartialEq for TypeKind
Auto Trait Implementations§
impl Freeze for TypeKind
impl RefUnwindSafe for TypeKind
impl Send for TypeKind
impl Sync for TypeKind
impl Unpin for TypeKind
impl UnsafeUnpin for TypeKind
impl UnwindSafe for TypeKind
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
Mutably borrows from an owned value. Read more