Trait tc_btree::BTreeInstance
source · [−]pub trait BTreeInstance: Clone + Instance {
type Slice: BTreeInstance;
fn collator(&self) -> &ValueCollator;
fn schema(&self) -> &RowSchema;
fn slice(self, range: Range, reverse: bool) -> TCResult<Self::Slice>;
fn is_empty<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn keys<'a, 'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCBoxTryStream<'a, Key>>> + Send + 'async_trait>>
where
Self: 'a,
'a: 'async_trait,
Self: 'async_trait;
fn validate_key(&self, key: Key) -> TCResult<Key>;
fn count<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
}
Expand description
Common BTree
methods.
Required Associated Types
type Slice: BTreeInstance
Required Methods
fn collator(&self) -> &ValueCollator
fn collator(&self) -> &ValueCollator
Borrow this BTree
’s collator.
Return a slice of this BTree
with the given range.
Return true
if this BTree
has no Key
s.
Return a Stream
of this BTree
’s Key
s.
fn validate_key(&self, key: Key) -> TCResult<Key>
fn validate_key(&self, key: Key) -> TCResult<Key>
Return an error if the given key does not match this BTree
’s schema
If the key is valid, this will return a copy with the data types correctly casted.