Skip to main content

ColumnTypeTrait

Trait ColumnTypeTrait 

Source
pub trait ColumnTypeTrait {
    // Required methods
    fn def(self) -> ColumnDef;
    fn get_enum_name(&self) -> Option<&DynIden>;
}
Expand description

Extension methods on ColumnType for building ColumnDefs and inspecting database ENUM metadata.

Required Methods§

Source

fn def(self) -> ColumnDef

Wrap this ColumnType in a fresh ColumnDef.

Source

fn get_enum_name(&self) -> Option<&DynIden>

Name of the database ENUM type if this column is an enum, None otherwise.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§