[][src]Trait eosio_cdt::TableCursor

pub trait TableCursor<T>: IntoIterator where
    T: Table
{ fn get(&self) -> Result<T::Row, ReadError>;
fn erase(&self) -> Result<T::Row, ReadError>;
fn modify<I: Borrow<T::Row>>(
        &self,
        payer: Payer,
        item: I
    ) -> Result<usize, WriteError>; }

Table Cursor

Required methods

fn get(&self) -> Result<T::Row, ReadError>

Read and deserialize the current table row

Errors

Will return Err if there was an issue reading the stored value.

fn erase(&self) -> Result<T::Row, ReadError>

Erase the current row

Errors

Will return Err if there was an issue reading the stored value. Stored values must be read in order to erase secondary indexes.

fn modify<I: Borrow<T::Row>>(
    &self,
    payer: Payer,
    item: I
) -> Result<usize, WriteError>

Modify the current row

Errors

Will return Err if there was an issue serializing the value.

Loading content...

Implementors

impl<'a, K, T> TableCursor<T> for SecondaryTableCursor<'a, K, T> where
    K: IntoNativeSecondaryKey,
    T: Table
[src]

impl<T> TableCursor<T> for PrimaryTableCursor<T> where
    T: Table
[src]

Loading content...