pub enum CreateTypeBody {
CustomType {
params: Vec<TypeParam>,
base: String,
encode: Option<Box<Expr>>,
decode: Option<Box<Expr>>,
operators: Vec<TypeOperator>,
default: Option<Box<Expr>>,
},
Struct(Vec<TypeField>),
Union(Vec<TypeField>),
}Expand description
Body of a CREATE TYPE statement
Variants§
CustomType
Custom type with encode/decode (e.g., varchar, email)
Fields
§
operators: Vec<TypeOperator>operator-to-function mappings
Struct(Vec<TypeField>)
CREATE TYPE name AS STRUCT(field1 type1, field2 type2, ...)
Union(Vec<TypeField>)
CREATE TYPE name AS UNION(variant1 type1, variant2 type2, ...)
Trait Implementations§
Source§impl Clone for CreateTypeBody
impl Clone for CreateTypeBody
Source§fn clone(&self) -> CreateTypeBody
fn clone(&self) -> CreateTypeBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateTypeBody
impl Debug for CreateTypeBody
impl Eq for CreateTypeBody
Source§impl PartialEq for CreateTypeBody
impl PartialEq for CreateTypeBody
impl StructuralPartialEq for CreateTypeBody
Auto Trait Implementations§
impl Freeze for CreateTypeBody
impl RefUnwindSafe for CreateTypeBody
impl Send for CreateTypeBody
impl Sync for CreateTypeBody
impl Unpin for CreateTypeBody
impl UnsafeUnpin for CreateTypeBody
impl UnwindSafe for CreateTypeBody
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