Trait tc_btree::BTreeInstance [−][src]
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>; #[must_use] 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; #[must_use] fn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn insert<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn keys<'a, 'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Key>>> + Send + 'async_trait>>
where
Self: 'a,
'a: 'async_trait,
Self: 'async_trait; #[must_use] 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, { ... } #[must_use] fn try_insert_from<'life0, 'async_trait, S: Stream<Item = TCResult<Key>> + Send + Unpin>(
&'life0 self,
txn_id: TxnId,
keys: S
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>
where
S: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait, { ... } }
Expand description
Common BTree
methods.
Associated Types
type Slice: BTreeInstance
[src]
Required methods
fn collator(&self) -> &ValueCollator
[src]
Expand description
Return a reference to this BTree
’s collator.
fn schema(&self) -> &RowSchema
[src]
Expand description
Return a reference to this BTree
’s schema.
fn slice(self, range: Range, reverse: bool) -> TCResult<Self::Slice>
[src]
Expand description
Return a slice of this BTree
’s with the given range.
#[must_use]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,
[src]
#[must_use]
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,
Expand description
Return true
if this BTree
has no Key
s.
#[must_use]fn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]
fn delete<'life0, 'async_trait>(&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Expand description
Delete all the Key
s in this BTree
.
#[must_use]fn insert<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]
fn insert<'life0, 'async_trait>(&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Expand description
#[must_use]fn keys<'a, 'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Key>>> + Send + 'async_trait>> where
Self: 'a,
'a: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]
fn keys<'a, 'async_trait>(self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Key>>> + Send + 'async_trait>> where
Self: 'a,
'a: 'async_trait,
Self: 'async_trait,
Expand description
Return a Stream
of this BTree
’s Key
s.
Provided methods
#[must_use]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,
[src]
#[must_use]
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
Return the number of Key
s in this BTree
.
#[must_use]fn try_insert_from<'life0, 'async_trait, S: Stream<Item = TCResult<Key>> + Send + Unpin>(
&'life0 self,
txn_id: TxnId,
keys: S
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
S: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
[src]
#[must_use]
fn try_insert_from<'life0, 'async_trait, S: Stream<Item = TCResult<Key>> + Send + Unpin>(&'life0 self,
txn_id: TxnId,
keys: S
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
S: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
Expand description
Insert all the keys from the given Stream
into this BTree
.
This will stop and return an error if it encounters an invalid Key
.
Implementors
impl<F: File<Node>, D: Dir, T: Transaction<D>> BTreeInstance for BTree<F, D, T> where
Self: 'static,
[src]
impl<F: File<Node>, D: Dir, T: Transaction<D>> BTreeInstance for BTree<F, D, T> where
Self: 'static,
[src]type Slice = Self
fn collator(&self) -> &ValueCollator
[src]
fn schema(&self) -> &RowSchema
[src]
fn slice(self, range: Range, reverse: bool) -> TCResult<Self>
[src]
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,
[src]
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn insert<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + 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<TCTryStream<'a, Key>>> + Send + 'async_trait>> where
Self: 'a,
'a: 'async_trait,
Self: 'async_trait,
[src]
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Key>>> + Send + 'async_trait>> where
Self: 'a,
'a: 'async_trait,
Self: 'async_trait,
impl<F: File<Node>, D: Dir, T: Transaction<D>> BTreeInstance for BTreeFile<F, D, T> where
Self: Clone,
BTreeSlice<F, D, T>: 'static,
[src]
impl<F: File<Node>, D: Dir, T: Transaction<D>> BTreeInstance for BTreeFile<F, D, T> where
Self: Clone,
BTreeSlice<F, D, T>: 'static,
[src]type Slice = BTreeSlice<F, D, T>
fn collator(&self) -> &ValueCollator
[src]
fn schema(&self) -> &RowSchema
[src]
fn slice(self, range: Range, reverse: bool) -> TCResult<Self::Slice>
[src]
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,
[src]
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn insert<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + 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<TCTryStream<'a, Key>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Key>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
impl<F: File<Node>, D: Dir, T: Transaction<D>> BTreeInstance for BTreeSlice<F, D, T> where
BTreeFile<F, D, T>: Clone + 'static,
[src]
impl<F: File<Node>, D: Dir, T: Transaction<D>> BTreeInstance for BTreeSlice<F, D, T> where
BTreeFile<F, D, T>: Clone + 'static,
[src]type Slice = Self
fn collator(&self) -> &ValueCollator
[src]
fn schema(&self) -> &RowSchema
[src]
fn slice(self, range: Range, reverse: bool) -> TCResult<Self::Slice>
[src]
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,
[src]
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn insert<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + 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<TCTryStream<'a, Key>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
[src]
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCTryStream<'a, Key>>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,