pub enum Table<F, D, Txn> {
Table(TableIndex<F, D, Txn>),
Index(Index<F, D, Txn>),
IndexSlice(IndexSlice<F, D, Txn>),
Limit(Box<Limited<F, D, Txn>>),
Merge(Merged<F, D, Txn>),
Selection(Box<Selection<F, D, Txn, Table<F, D, Txn>>>),
TableSlice(TableSlice<F, D, Txn>),
}
Expand description
An ordered collection of Row
s which supports BTree
-based indexing
Variants
Table(TableIndex<F, D, Txn>)
Index(Index<F, D, Txn>)
IndexSlice(IndexSlice<F, D, Txn>)
Limit(Box<Limited<F, D, Txn>>)
Merge(Merged<F, D, Txn>)
Selection(Box<Selection<F, D, Txn, Table<F, D, Txn>>>)
TableSlice(TableSlice<F, D, Txn>)
Trait Implementations
sourceimpl<F: File<Node>, D: Dir, Txn: Transaction<D>> From<TableIndex<F, D, Txn>> for Table<F, D, Txn>
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> From<TableIndex<F, D, Txn>> for Table<F, D, Txn>
sourcefn from(table: TableIndex<F, D, Txn>) -> Self
fn from(table: TableIndex<F, D, Txn>) -> Self
Converts to this type from the input type.
sourceimpl<F: File<Node>, D: Dir, Txn: Transaction<D>> FromStream for Table<F, D, Txn> where
D::File: AsType<F>,
D::FileClass: From<BTreeType>,
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> FromStream for Table<F, D, Txn> where
D::File: AsType<F>,
D::FileClass: From<BTreeType>,
type Context = Txn
type Context = Txn
The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more
sourcefn from_stream<'life0, 'async_trait, De>(
txn: Txn,
decoder: &'life0 mut De
) -> Pin<Box<dyn Future<Output = Result<Self, De::Error>> + Send + 'async_trait>> where
De: 'async_trait + Decoder,
'life0: 'async_trait,
Self: 'async_trait,
fn from_stream<'life0, 'async_trait, De>(
txn: Txn,
decoder: &'life0 mut De
) -> Pin<Box<dyn Future<Output = Result<Self, De::Error>> + Send + 'async_trait>> where
De: 'async_trait + Decoder,
'life0: 'async_trait,
Self: 'async_trait,
Parse this value using the given Decoder
.
sourceimpl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableInstance for Table<F, D, Txn> where
Self: Send + Sync,
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableInstance for Table<F, D, Txn> where
Self: Send + Sync,
sourceimpl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableOrder for Table<F, D, Txn> where
Self: Send + Sync,
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableOrder for Table<F, D, Txn> where
Self: Send + Sync,
sourceimpl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableRead for Table<F, D, Txn> where
Self: Send + Sync,
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableRead for Table<F, D, Txn> where
Self: Send + Sync,
sourceimpl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableSlice for Table<F, D, Txn> where
Self: Send + Sync,
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableSlice for Table<F, D, Txn> where
Self: Send + Sync,
sourceimpl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableStream for Table<F, D, Txn> where
Self: Send + Sync,
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableStream for Table<F, D, Txn> where
Self: Send + Sync,
type Limit = Table<F, D, Txn>
type Selection = Table<F, D, Txn>
sourcefn count<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>> where
Self: 'async_trait,
fn count<'async_trait>(
self,
txn_id: TxnId
) -> Pin<Box<dyn Future<Output = TCResult<u64>> + Send + 'async_trait>> where
Self: 'async_trait,
Return the number of rows in this Table
.
sourcefn limit(self, limit: u64) -> <Self as TableStream>::Limit
fn limit(self, limit: u64) -> <Self as TableStream>::Limit
Limit the number of rows returned by rows
.
sourceimpl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableWrite for Table<F, D, Txn> where
Self: Send + Sync,
impl<F: File<Node>, D: Dir, Txn: Transaction<D>> TableWrite for Table<F, D, Txn> where
Self: Send + Sync,
sourcefn delete<'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 delete<'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,
Delete the given Row
from this table, if present.
Auto Trait Implementations
impl<F, D, Txn> RefUnwindSafe for Table<F, D, Txn> where
D: RefUnwindSafe,
F: RefUnwindSafe,
Txn: RefUnwindSafe,
impl<F, D, Txn> Send for Table<F, D, Txn> where
D: Send + Sync,
F: Send + Sync,
Txn: Send + Sync,
impl<F, D, Txn> Sync for Table<F, D, Txn> where
D: Send + Sync,
F: Send + Sync,
Txn: Send + Sync,
impl<F, D, Txn> Unpin for Table<F, D, Txn>
impl<F, D, Txn> UnwindSafe for Table<F, D, Txn> where
D: UnwindSafe + RefUnwindSafe,
F: UnwindSafe + RefUnwindSafe,
Txn: UnwindSafe + 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
.