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: bool
Does the field have the Annotation::AutoCreateTime?
auto_update_time: bool
Does the field have the Annotation::AutoUpdateTime?
auto_increment: bool
Does the field have the Annotation::AutoIncrement?
choices: bool
Does the field have the Annotation::Choices?
default: bool
Does the field have the Annotation::DefaultValue?
index: bool
Does the field have the Annotation::Index?
max_length: bool
Does the field have the Annotation::MaxLength?
not_null: bool
Does the field have the Annotation::NotNull?
primary_key: bool
Does the field have the Annotation::PrimaryKey?
unique: bool
Does the field have the Annotation::Unique?
foreign_key: bool
Does 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
Returns a duplicate of the value. Read more
1.0.0 · 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 Annotations
impl Debug for Annotations
Source§impl Default for Annotations
impl Default for Annotations
Source§fn default() -> Annotations
fn default() -> Annotations
Returns the “default value” for a type. Read more
Source§impl From<&[Annotation]> for Annotations
impl From<&[Annotation]> for Annotations
Source§fn from(annotations: &[Annotation]) -> Self
fn from(annotations: &[Annotation]) -> Self
Converts to this type from the input type.
impl Copy for Annotations
Auto Trait Implementations§
impl Freeze for Annotations
impl RefUnwindSafe for Annotations
impl Send for Annotations
impl Sync for Annotations
impl Unpin for Annotations
impl UnwindSafe for Annotations
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