pub enum BTree<F, D, T> {
File(BTreeFile<F, D, T>),
Slice(BTreeSlice<F, D, T>),
}Expand description
A stateful, transaction-aware, ordered collection of Keys with O(log n) inserts and slicing
Variants§
File(BTreeFile<F, D, T>)
Slice(BTreeSlice<F, D, T>)
Trait Implementations§
source§impl<F, D, T> BTreeInstance for BTree<F, D, T>where
F: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
impl<F, D, T> BTreeInstance for BTree<F, D, T>where
F: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
type Slice = BTree<F, D, T>
source§fn collator(&self) -> &ValueCollator
fn collator(&self) -> &ValueCollator
Borrow this
BTree’s collator.source§fn slice(self, range: Range, reverse: bool) -> TCResult<Self>
fn slice(self, range: Range, reverse: bool) -> TCResult<Self>
Return a slice of this
BTree with the given range.source§fn is_empty<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_empty<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
source§fn keys<'a, 'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCBoxTryStream<'a, Key>>> + Send + 'async_trait>>where
Self: 'a + 'async_trait,
'a: '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 + 'async_trait,
'a: 'async_trait,
source§impl<F: File<Key = NodeId, Block = Node>, D: Dir, T: Transaction<D>> BTreeWrite for BTree<F, D, T>where
Self: 'static,
impl<F: File<Key = NodeId, Block = Node>, D: Dir, T: Transaction<D>> BTreeWrite for BTree<F, D, T>where
Self: 'static,
source§fn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
range: Range
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
range: Range
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete all the
Keys in this BTree.source§fn insert<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
key: Key
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
source§impl<F, D, T> From<BTreeSlice<F, D, T>> for BTree<F, D, T>
impl<F, D, T> From<BTreeSlice<F, D, T>> for BTree<F, D, T>
source§fn from(btree: BTreeSlice<F, D, T>) -> Self
fn from(btree: BTreeSlice<F, D, T>) -> Self
Converts to this type from the input type.
source§impl<F, D, T> FromStream for BTree<F, D, T>where
F: File<Key = NodeId, Block = Node, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
D: Dir,
T: Transaction<D>,
D::Store: From<F>,
Self: Send + Sync + 'static,
impl<F, D, T> FromStream for BTree<F, D, T>where
F: File<Key = NodeId, Block = Node, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
D: Dir,
T: Transaction<D>,
D::Store: From<F>,
Self: Send + Sync + 'static,
Auto Trait Implementations§
impl<F, D, T> !RefUnwindSafe for BTree<F, D, T>
impl<F, D, T> Send for BTree<F, D, T>where
D: Send + Sync,
F: Send + Sync,
T: Send + Sync,
impl<F, D, T> Sync for BTree<F, D, T>where
D: Send + Sync,
F: Send + Sync,
T: Send + Sync,
impl<F, D, T> Unpin for BTree<F, D, T>
impl<F, D, T> !UnwindSafe for BTree<F, D, T>
Blanket Implementations§
source§impl<F> Match for F
impl<F> Match for F
source§fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns
true if self can be cast into the target type T.source§impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
source§fn can_cast_from(_: &F) -> bool
fn can_cast_from(_: &F) -> bool
Test if
value can be cast into Self.source§fn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns
Some(Self) if the source value can be cast into Self, otherwise None.source§impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
source§fn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if
self can be cast into T.source§fn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns
Some(T) if self can be cast into T, otherwise None.