pub struct Key(/* private fields */);Expand description
Key 字段 Builder。
Implementations§
Source§impl Key
impl Key
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
标记租户隔离键。
Trait Implementations§
Source§impl IntoFieldSpec for Key
impl IntoFieldSpec for Key
Source§fn into_field_spec(self, name: FieldName) -> FieldSpec
fn into_field_spec(self, name: FieldName) -> FieldSpec
绑定字段名并生成唯一原生定义。
Auto Trait Implementations§
impl Forget for Key
impl Freeze for Key
impl Move for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
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