Struct tc_table::TableIndex
source · [−]pub struct TableIndex<F, D, Txn> { /* private fields */ }Expand description
The base type of a Table.
Implementations
Create a new TableIndex with the given TableSchema.
Return true if this table has zero rows.
Return an index which supports the given Bounds, or an error if there is none.
pub async fn slice_rows<'a>(
self,
txn_id: TxnId,
bounds: Bounds,
reverse: bool
) -> TCResult<TCBoxTryStream<'a, Vec<Value>>>
pub async fn slice_rows<'a>(
self,
txn_id: TxnId,
bounds: Bounds,
reverse: bool
) -> TCResult<TCBoxTryStream<'a, Vec<Value>>>
Stream the rows within the given Bounds from the primary index of this TableIndex.
Trait Implementations
impl<F: File<Node>, D: Dir, Txn: Transaction<D>, I: TableStream + 'static> CopyFrom<D, I> for TableIndex<F, D, Txn> where
D::File: AsType<F>,
<D as Dir>::FileClass: From<BTreeType> + Send,
impl<F: File<Node>, D: Dir, Txn: Transaction<D>, I: TableStream + 'static> CopyFrom<D, I> for TableIndex<F, D, Txn> where
D::File: AsType<F>,
<D as Dir>::FileClass: From<BTreeType> + Send,
impl<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>
Performs the conversion.
Return an ordered view of this table.
Limit the returned rows to the given Bounds.
Delete the given Row from this table, if present.
Update one row of this table.
impl<F: File<Node> + Transact, D: Dir, Txn: Transaction<D>> Transact for TableIndex<F, D, Txn>
impl<F: File<Node> + Transact, D: Dir, Txn: Transaction<D>> Transact for TableIndex<F, D, Txn>
Commit this transaction.
Auto Trait Implementations
impl<F, D, Txn> RefUnwindSafe for TableIndex<F, D, Txn> where
D: RefUnwindSafe,
F: RefUnwindSafe,
Txn: RefUnwindSafe,
impl<F, D, Txn> Send for TableIndex<F, D, Txn> where
D: Send + Sync,
F: Send + Sync,
Txn: Send + Sync,
impl<F, D, Txn> Sync for TableIndex<F, D, Txn> where
D: Send + Sync,
F: Send + Sync,
Txn: Send + Sync,
impl<F, D, Txn> Unpin for TableIndex<F, D, Txn>
impl<F, D, Txn> UnwindSafe for TableIndex<F, D, Txn> where
D: RefUnwindSafe,
F: RefUnwindSafe,
Txn: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns true if self can be cast into the target type T.
Test if value can be cast into Self.
Returns Some(Self) if the source value can be cast into Self, otherwise None.
fn 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.
Test if self can be cast into T.
Returns Some(T) if self can be cast into T, otherwise None.
fn 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.