pub struct BTreeFile<F, D, T> { /* private fields */ }
Expand description
The base type of a BTree
Trait Implementations§
source§impl<F, D, T> BTreeInstance for BTreeFile<F, D, T>where
F: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
BTreeSlice<F, D, T>: 'static,
Self: Clone,
impl<F, D, T> BTreeInstance for BTreeFile<F, D, T>where
F: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
BTreeSlice<F, D, T>: 'static,
Self: Clone,
type Slice = BTreeSlice<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::Slice>
fn slice(self, range: Range, reverse: bool) -> TCResult<Self::Slice>
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: '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: 'async_trait,
'a: 'async_trait,
source§impl<F, D, T> BTreeWrite for BTreeFile<F, D, T>where
F: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
BTreeSlice<F, D, T>: 'static,
Self: Clone,
impl<F, D, T> BTreeWrite for BTreeFile<F, D, T>where
F: File<Key = NodeId, Block = Node>,
D: Dir,
T: Transaction<D>,
BTreeSlice<F, D, T>: 'static,
Self: Clone,
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
Key
s 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, I> CopyFrom<D, I> for BTreeFile<F, D, T>where
F: File<Key = NodeId, Block = Node, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
D: Dir,
T: Transaction<D>,
I: BTreeInstance + 'static,
D::Store: From<F>,
impl<F, D, T, I> CopyFrom<D, I> for BTreeFile<F, D, T>where
F: File<Key = NodeId, Block = Node, Inner = D::Inner> + TryFrom<D::Store, Error = TCError>,
D: Dir,
T: Transaction<D>,
I: BTreeInstance + 'static,
D::Store: From<F>,
source§impl<F, D, T> FromStream for BTreeFile<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 BTreeFile<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,
source§impl<F, D, T> Persist<D> for BTreeFile<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>,
impl<F, D, T> Persist<D> for BTreeFile<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>,
type Txn = T
type Schema = Vec<Column, Global>
source§fn create(txn_id: TxnId, schema: Self::Schema, store: D::Store) -> TCResult<Self>
fn create(txn_id: TxnId, schema: Self::Schema, store: D::Store) -> TCResult<Self>
Create a new instance of
Self
from an empty Store
.source§fn load(txn_id: TxnId, schema: Self::Schema, store: D::Store) -> TCResult<Self>
fn load(txn_id: TxnId, schema: Self::Schema, store: D::Store) -> TCResult<Self>
Load a saved instance of
Self
from persistent storage.
Should only be invoked at startup time.source§impl<F, D, T> Restore<D> for BTreeFile<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>,
impl<F, D, T> Restore<D> for BTreeFile<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>,
source§impl<F, D, T> Transact for BTreeFile<F, D, T>where
F: File<Key = NodeId, Block = Node> + Transact,
D: Dir,
T: Transaction<D>,
impl<F, D, T> Transact for BTreeFile<F, D, T>where
F: File<Key = NodeId, Block = Node> + Transact,
D: Dir,
T: Transaction<D>,
source§fn commit<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = Self::Commit> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn commit<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = Self::Commit> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Commit this transaction.
Auto Trait Implementations§
impl<F, D, T> !RefUnwindSafe for BTreeFile<F, D, T>
impl<F, D, T> Send for BTreeFile<F, D, T>where
D: Send + Sync,
F: Send + Sync,
T: Send + Sync,
impl<F, D, T> Sync for BTreeFile<F, D, T>where
D: Send + Sync,
F: Send + Sync,
T: Send + Sync,
impl<F, D, T> Unpin for BTreeFile<F, D, T>
impl<F, D, T> !UnwindSafe for BTreeFile<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
.