pub struct Annotations {
pub auto_create_time: bool,
pub auto_update_time: bool,
pub auto_increment: bool,
pub choices: bool,
pub default: bool,
pub index: bool,
pub max_length: bool,
pub not_null: bool,
pub primary_key: bool,
pub unique: bool,
pub foreign_key: bool,
}Expand description
Simple struct storing whether a specific annotation is set on a given field or not.
Fields§
§auto_create_time: boolDoes the field have the Annotation::AutoCreateTime?
auto_update_time: boolDoes the field have the Annotation::AutoUpdateTime?
auto_increment: boolDoes the field have the Annotation::AutoIncrement?
choices: boolDoes the field have the Annotation::Choices?
default: boolDoes the field have the Annotation::DefaultValue?
index: boolDoes the field have an Annotation::Index without a name?
A named index may span several columns, which makes it valid on columns where a single column index wouldn’t be, most notably a primary key. Since this struct can’t express which columns an index spans, named indexes are not tracked here at all.
max_length: boolDoes the field have the Annotation::MaxLength?
not_null: boolDoes the field have the Annotation::NotNull?
primary_key: boolDoes the field have the Annotation::PrimaryKey?
unique: boolDoes the field have the Annotation::Unique?
foreign_key: boolDoes the field have the Annotation::ForeignKey?
Implementations§
Trait Implementations§
Source§impl Clone for Annotations
impl Clone for Annotations
Source§fn clone(&self) -> Annotations
fn clone(&self) -> Annotations
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more