#[non_exhaustive]pub struct SchemaFlags {
pub searchable: bool,
pub filterable: bool,
pub sortable: bool,
pub readonly: bool,
}Expand description
Per-column flags consumed by the admin UI and the search indexer.
Defaulted to all-false so a column with no flags is the safe
minimum: editable, not searchable, not filterable, not sortable.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.searchable: boolIndexed for full-text search (Meili searchable_attributes).
Compile-time invariant in the macro layer (commit 2): only
RustType::String (and Optional<String> via
ModelColumn::nullable = true) may set this.
filterable: boolAvailable for filter= queries (Meili
filterable_attributes).
sortable: boolAvailable for sort= queries (Meili sortable_attributes).
readonly: boolAdmin form treats this as readonly (no <input>, just a
rendered value). Auto-managed columns (created_at,
generated columns) typically set this.
Implementations§
Source§impl SchemaFlags
impl SchemaFlags
Sourcepub const fn empty() -> Self
pub const fn empty() -> Self
All-false flags. Equivalent to SchemaFlags::default(),
but const fn so it composes inside other const fn
constructors. Use this in static declarations the macro
emits in commit 2 — Default::default() is not const.
Sourcepub const fn searchable() -> Self
pub const fn searchable() -> Self
Convenience constructor for the most common case: a fully indexed text column (“title”, “body” on a content model).
Trait Implementations§
Source§impl Clone for SchemaFlags
impl Clone for SchemaFlags
Source§fn clone(&self) -> SchemaFlags
fn clone(&self) -> SchemaFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SchemaFlags
impl Debug for SchemaFlags
Source§impl Default for SchemaFlags
impl Default for SchemaFlags
Source§fn default() -> SchemaFlags
fn default() -> SchemaFlags
Source§impl PartialEq for SchemaFlags
impl PartialEq for SchemaFlags
impl Copy for SchemaFlags
impl Eq for SchemaFlags
impl StructuralPartialEq for SchemaFlags
Auto Trait Implementations§
impl Freeze for SchemaFlags
impl RefUnwindSafe for SchemaFlags
impl Send for SchemaFlags
impl Sync for SchemaFlags
impl Unpin for SchemaFlags
impl UnsafeUnpin for SchemaFlags
impl UnwindSafe for SchemaFlags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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