pub struct IndexFragment { /* private fields */ }Expand description
One secondary-index proposal definition.
Implementations§
Source§impl IndexFragment
impl IndexFragment
Sourcepub fn try_new(
name: SchemaName,
key: Vec<IndexKeyFragment>,
unique: bool,
predicate: Option<SourceCheckExpr>,
) -> Result<IndexFragment, SchemaContractError>
pub fn try_new( name: SchemaName, key: Vec<IndexKeyFragment>, unique: bool, predicate: Option<SourceCheckExpr>, ) -> Result<IndexFragment, SchemaContractError>
Construct one bounded index definition.
§Errors
Returns a typed reference-list error when no key component is present.
Sourcepub const fn source_key(&self) -> &IndexSourceKey
pub const fn source_key(&self) -> &IndexSourceKey
Borrow the typed proposal key derived from the current index name.
Sourcepub const fn name(&self) -> &SchemaName
pub const fn name(&self) -> &SchemaName
Borrow the current index name.
Sourcepub fn key(&self) -> &[IndexKeyFragment]
pub fn key(&self) -> &[IndexKeyFragment]
Borrow ordered index key components.
Sourcepub const fn predicate(&self) -> Option<&SourceCheckExpr>
pub const fn predicate(&self) -> Option<&SourceCheckExpr>
Borrow the optional source predicate.
Trait Implementations§
Source§impl Clone for IndexFragment
impl Clone for IndexFragment
Source§fn clone(&self) -> IndexFragment
fn clone(&self) -> IndexFragment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 IndexFragment
impl Debug for IndexFragment
impl Eq for IndexFragment
Source§impl PartialEq for IndexFragment
impl PartialEq for IndexFragment
impl StructuralPartialEq for IndexFragment
Auto Trait Implementations§
impl Freeze for IndexFragment
impl RefUnwindSafe for IndexFragment
impl Send for IndexFragment
impl Sync for IndexFragment
impl Unpin for IndexFragment
impl UnsafeUnpin for IndexFragment
impl UnwindSafe for IndexFragment
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<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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.