pub struct IndexFragment { /* private fields */ }Expand description
One secondary-index proposal definition.
Implementations§
Source§impl IndexFragment
impl IndexFragment
Sourcepub fn try_new(
source_key: IndexSourceKey,
name: SchemaName,
key: Vec<IndexKeyFragment>,
unique: bool,
predicate: Option<SourceCheckExpr>,
) -> Result<IndexFragment, SchemaContractError>
pub fn try_new( source_key: IndexSourceKey, 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 immutable source key.
Sourcepub const fn name(&self) -> &SchemaName
pub const fn name(&self) -> &SchemaName
Borrow the editable 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 CandidType for IndexFragment
impl CandidType for IndexFragment
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
Source§impl<'de> Deserialize<'de> for IndexFragment
impl<'de> Deserialize<'de> for IndexFragment
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IndexFragment, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IndexFragment, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for IndexFragment
Source§impl PartialEq for IndexFragment
impl PartialEq for IndexFragment
Source§impl Serialize for IndexFragment
impl Serialize for IndexFragment
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.