Trait Field

Source
pub trait Field {
    // Required methods
    fn get_name(&self) -> String;
    fn get_type(&self) -> Box<dyn FieldType>;

    // Provided methods
    fn get_default(&self) -> Option<String> { ... }
    fn get_nullable(&self) -> bool { ... }
    fn get_primary_key(&self) -> bool { ... }
    fn get_unique(&self) -> bool { ... }
    fn get_auto_increment(&self) -> bool { ... }
    fn get_comment(&self) -> Option<String> { ... }
    fn get_create_sql(&self) -> String { ... }
}

Required Methods§

Source

fn get_name(&self) -> String

Source

fn get_type(&self) -> Box<dyn FieldType>

Provided Methods§

Implementors§