Trait PrimaryTableIndexExt

Source
pub trait PrimaryTableIndexExt<'a, T>: TableIndex<'a, u64, T, Cursor = PrimaryTableCursor<T>>
where T: Table + 'a,
{ // Provided methods fn begin(&'a self) -> Option<Self::Cursor> { ... } fn iter(&'a self) -> PrimaryTableIterator<T> { ... } fn count(&'a self) -> usize { ... } fn end(&'a self) -> i32 { ... } fn available_primary_key(&'a self) -> Option<u64> { ... } }
Expand description

Trait for functions of a PrimaryTableIndex that only apply within a smart contract

Provided Methods§

Source

fn begin(&'a self) -> Option<Self::Cursor>

Returns the first row in the table

Source

fn iter(&'a self) -> PrimaryTableIterator<T>

Iterate over rows in the table

Source

fn count(&'a self) -> usize

Total number of rows in the table

Source

fn end(&'a self) -> i32

Returns the last row in the table

Source

fn available_primary_key(&'a self) -> Option<u64>

Gets the next available primary key

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a, T> PrimaryTableIndexExt<'a, T> for PrimaryTableIndex<T>
where T: Table + 'a,

Implementors§