pub struct FieldMetadata<'a> { /* private fields */ }Expand description
只读字段元数据视图。
Implementations§
Source§impl<'a> FieldMetadata<'a>
impl<'a> FieldMetadata<'a>
Sourcepub fn is_tenant_key(self) -> bool
pub fn is_tenant_key(self) -> bool
返回字段是否承担租户隔离键语义。
Sourcepub fn field_type(self) -> &'a FieldType
pub fn field_type(self) -> &'a FieldType
返回字段类型。
Sourcepub fn is_required(self) -> bool
pub fn is_required(self) -> bool
返回字段是否必填。
Sourcepub fn default_value(self) -> Option<&'a Value>
pub fn default_value(self) -> Option<&'a Value>
返回字段默认值。
Sourcepub fn is_auto_increment(self) -> bool
pub fn is_auto_increment(self) -> bool
返回字段是否由数据库自增生成。
Sourcepub fn is_searchable(self) -> bool
pub fn is_searchable(self) -> bool
返回字段是否允许关键词搜索。
Sourcepub fn is_filterable(self) -> bool
pub fn is_filterable(self) -> bool
返回字段是否允许筛选。
Sourcepub fn is_sortable(self) -> bool
pub fn is_sortable(self) -> bool
返回字段是否允许排序。
Trait Implementations§
Source§impl<'a> Clone for FieldMetadata<'a>
impl<'a> Clone for FieldMetadata<'a>
impl<'a> Copy for FieldMetadata<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for FieldMetadata<'a>
impl<'a> !UnwindSafe for FieldMetadata<'a>
impl<'a> Forget for FieldMetadata<'a>
impl<'a> Freeze for FieldMetadata<'a>
impl<'a> Move for FieldMetadata<'a>
impl<'a> Send for FieldMetadata<'a>
impl<'a> Sync for FieldMetadata<'a>
impl<'a> Unpin for FieldMetadata<'a>
impl<'a> UnsafeUnpin for FieldMetadata<'a>
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