pub struct TimestampFields {
pub created_at: Option<&'static str>,
pub updated_at: Option<&'static str>,
pub auto_now_insert: bool,
pub auto_now_update: bool,
}Expand description
时间戳字段配置
Fields§
§created_at: Option<&'static str>created_at 字段名
updated_at: Option<&'static str>updated_at 字段名
auto_now_insert: bool插入时是否自动设置时间戳
auto_now_update: bool更新时是否自动刷新时间戳
Implementations§
Trait Implementations§
Source§impl Clone for TimestampFields
impl Clone for TimestampFields
Source§fn clone(&self) -> TimestampFields
fn clone(&self) -> TimestampFields
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 TimestampFields
impl Debug for TimestampFields
Source§impl Default for TimestampFields
impl Default for TimestampFields
Source§fn default() -> TimestampFields
fn default() -> TimestampFields
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TimestampFields
impl RefUnwindSafe for TimestampFields
impl Send for TimestampFields
impl Sync for TimestampFields
impl Unpin for TimestampFields
impl UnsafeUnpin for TimestampFields
impl UnwindSafe for TimestampFields
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more