pub struct Timestamp(/* private fields */);Expand description
Timestamp 字段 Builder。
Implementations§
Source§impl Timestamp
impl Timestamp
Sourcepub fn description(self, value: impl Into<String>) -> Self
pub fn description(self, value: impl Into<String>) -> Self
设置帮助说明。
Sourcepub fn widget(self, value: WidgetHint) -> Self
pub fn widget(self, value: WidgetHint) -> Self
设置前端控件提示;不改变字段存储和权限语义。
Sourcepub fn renamed_from(self, legacy_name: impl Into<String>) -> Self
pub fn renamed_from(self, legacy_name: impl Into<String>) -> Self
声明当前字段由旧列原位改名而来。
Sourcepub fn searchable(self, value: bool) -> Self
pub fn searchable(self, value: bool) -> Self
设置是否允许全文关键词搜索。
Sourcepub fn filterable(self, value: bool) -> Self
pub fn filterable(self, value: bool) -> Self
设置是否允许结构化条件筛选。
Sourcepub fn readable_by<I, S>(self, roles: I) -> Self
pub fn readable_by<I, S>(self, roles: I) -> Self
限制可读角色。
Sourcepub fn writable_by<I, S>(self, roles: I) -> Self
pub fn writable_by<I, S>(self, roles: I) -> Self
限制可写角色。
Sourcepub fn tenant_key(self, value: bool) -> Self
pub fn tenant_key(self, value: bool) -> Self
标记租户隔离键。
Source§impl Timestamp
impl Timestamp
Sourcepub fn created_at(self) -> Self
pub fn created_at(self) -> Self
标记为插入时自动写入的创建时间。
Sourcepub fn updated_at(self) -> Self
pub fn updated_at(self) -> Self
标记为更新时自动写入的更新时间。
Sourcepub fn soft_delete(self) -> Self
pub fn soft_delete(self) -> Self
标记为软删除时间。
Trait Implementations§
Source§impl IntoFieldSpec for Timestamp
impl IntoFieldSpec for Timestamp
Source§fn into_field_spec(self, name: FieldName) -> FieldSpec
fn into_field_spec(self, name: FieldName) -> FieldSpec
绑定字段名并生成唯一原生定义。
Auto Trait Implementations§
impl Forget for Timestamp
impl Freeze for Timestamp
impl Move for Timestamp
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnsafeUnpin for Timestamp
impl UnwindSafe for Timestamp
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