pub struct BTreeFile<F, D, T> { /* private fields */ }
Expand description
The base type of a BTree
Implementations
Trait Implementations
sourceimpl<F: File<Node>, D: Dir, T: Transaction<D>> BTreeInstance for BTreeFile<F, D, T> where
Self: Clone,
BTreeSlice<F, D, T>: 'static,
impl<F: File<Node>, D: Dir, T: Transaction<D>> BTreeInstance for BTreeFile<F, D, T> where
Self: Clone,
BTreeSlice<F, D, T>: 'static,
type Slice = BTreeSlice<F, D, T>
sourcefn collator(&self) -> &ValueCollator
fn collator(&self) -> &ValueCollator
Borrow this BTree
’s collator.
sourcefn 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.
sourcefn 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 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,
Return true
if this BTree
has no Key
s.
sourcefn keys<'a, 'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<TCBoxTryStream<'a, Key>>> + Send + 'async_trait>> where
'a: '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
'a: 'async_trait,
Self: 'async_trait,
Return a Stream
of this BTree
’s Key
s.
sourceimpl<F: File<Node>, D: Dir, T: Transaction<D>> BTreeWrite for BTreeFile<F, D, T> where
Self: Clone,
BTreeSlice<F, D, T>: 'static,
impl<F: File<Node>, D: Dir, T: Transaction<D>> BTreeWrite for BTreeFile<F, D, T> where
Self: Clone,
BTreeSlice<F, D, T>: 'static,
sourcefn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
range: Range
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
txn_id: TxnId,
range: Range
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Delete all the Key
s in this BTree
.
sourcefn 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,
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,
sourcefn try_insert_from<'life0, 'async_trait, S>(
&'life0 self,
txn_id: TxnId,
keys: S
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
S: 'async_trait + Stream<Item = TCResult<Key>> + Send + Unpin,
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn try_insert_from<'life0, 'async_trait, S>(
&'life0 self,
txn_id: TxnId,
keys: S
) -> Pin<Box<dyn Future<Output = TCResult<()>> + Send + 'async_trait>> where
S: 'async_trait + Stream<Item = TCResult<Key>> + Send + Unpin,
'life0: 'async_trait,
Self: Sync + 'async_trait,
Insert all the keys from the given Stream
into this BTree
. Read more
sourceimpl<F: File<Node>, D: Dir, T: Transaction<D>, I: BTreeInstance + 'static> CopyFrom<D, I> for BTreeFile<F, D, T>
impl<F: File<Node>, D: Dir, T: Transaction<D>, I: BTreeInstance + 'static> CopyFrom<D, I> for BTreeFile<F, D, T>
sourceimpl<F: File<Node>, D: Dir, T: Transaction<D>> Persist<D> for BTreeFile<F, D, T>
impl<F: File<Node>, D: Dir, T: Transaction<D>> Persist<D> for BTreeFile<F, D, T>
sourceimpl<F: File<Node> + Transact, D: Dir, T: Transaction<D>> Transact for BTreeFile<F, D, T>
impl<F: File<Node> + Transact, D: Dir, T: Transaction<D>> Transact for BTreeFile<F, D, T>
Auto Trait Implementations
impl<F, D, T> RefUnwindSafe for BTreeFile<F, D, T> where
D: RefUnwindSafe,
F: RefUnwindSafe,
T: RefUnwindSafe,
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> where
D: RefUnwindSafe,
F: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F> Match for F
impl<F> Match for F
sourcefn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
Returns true
if self
can be cast into the target type T
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
sourcefn can_cast_from(&F) -> bool
fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
sourcefn 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
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
sourcefn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
sourcefn 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
.
sourcefn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.