pub struct IndexModel { /* private fields */ }Expand description
IndexModel
Runtime-only descriptor for an index used by the executor and stores.
Keeps core decoupled from the schema Index shape.
Indexing is hash-based over Value equality for all variants.
Unique indexes enforce value equality; hash collisions surface as corruption.
Implementations§
Source§impl IndexModel
impl IndexModel
pub const fn new( name: &'static str, store: &'static str, fields: &'static [&'static str], unique: bool, ) -> Self
Sourcepub const fn new_with_predicate(
name: &'static str,
store: &'static str,
fields: &'static [&'static str],
unique: bool,
predicate: Option<&'static str>,
) -> Self
pub const fn new_with_predicate( name: &'static str, store: &'static str, fields: &'static [&'static str], unique: bool, predicate: Option<&'static str>, ) -> Self
Construct one index descriptor with an optional conditional predicate.
Sourcepub const fn predicate(&self) -> Option<&'static str>
pub const fn predicate(&self) -> Option<&'static str>
Return optional schema-declared conditional index predicate metadata.
Sourcepub fn is_prefix_of(&self, other: &Self) -> bool
pub fn is_prefix_of(&self, other: &Self) -> bool
Whether this index’s field prefix matches the start of another index.
Trait Implementations§
Source§impl Clone for IndexModel
impl Clone for IndexModel
Source§fn clone(&self) -> IndexModel
fn clone(&self) -> IndexModel
Returns a duplicate of the value. Read more
1.0.0 · 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 IndexModel
impl Debug for IndexModel
Source§impl Display for IndexModel
impl Display for IndexModel
Source§impl PartialEq for IndexModel
impl PartialEq for IndexModel
impl Copy for IndexModel
impl Eq for IndexModel
impl StructuralPartialEq for IndexModel
Auto Trait Implementations§
impl Freeze for IndexModel
impl RefUnwindSafe for IndexModel
impl Send for IndexModel
impl Sync for IndexModel
impl Unpin for IndexModel
impl UnsafeUnpin for IndexModel
impl UnwindSafe for IndexModel
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