[][src]Trait eosio_cdt::NativeSecondaryKey

pub trait NativeSecondaryKey: Default {
    type NativeType;

    const END: EndFn;
    const NEXT: NextFn;
    const PREVIOUS: PreviousFn;
    const REMOVE: RemoveFn;
    const STORE: StoreFn<Self::NativeType>;
    const UPDATE: UpdateFn<Self::NativeType>;
    const LOWERBOUND: LowerboundFn<Self::NativeType>;
    const UPPERBOUND: UpperboundFn<Self::NativeType>;
    const FIND_PRIMARY: FindPrimaryFn<Self::NativeType>;
    const FIND_SECONDARY: FindSecondaryFn<Self::NativeType>;
    const DATA_LEN: u32;

    fn as_ptr(&self) -> *const Self::NativeType;
fn as_mut_ptr(&mut self) -> *mut Self::NativeType; #[must_use] fn db_idx_end(
        code: AccountName,
        scope: ScopeName,
        table: SecondaryTableName
    ) -> i32 { ... }
#[must_use] fn db_idx_next(iterator: i32) -> (i32, u64) { ... }
#[must_use] fn db_idx_previous(iterator: i32) -> (i32, u64) { ... }
fn db_idx_remove(iterator: i32) { ... }
fn db_idx_store(
        &self,
        scope: ScopeName,
        table: SecondaryTableName,
        payer: AccountName,
        id: u64
    ) -> i32 { ... }
fn db_idx_update(&self, iterator: i32, payer: AccountName) { ... }
fn db_idx_lowerbound(
        &mut self,
        code: AccountName,
        scope: ScopeName,
        table: SecondaryTableName
    ) -> (i32, u64) { ... }
fn db_idx_upperbound(
        &mut self,
        code: AccountName,
        scope: ScopeName,
        table: SecondaryTableName
    ) -> (i32, u64) { ... }
fn db_idx_find_primary(
        &mut self,
        code: AccountName,
        scope: ScopeName,
        table: SecondaryTableName,
        primary: u64
    ) -> i32 { ... }
fn db_idx_find_secondary(
        &self,
        code: AccountName,
        scope: ScopeName,
        table: SecondaryTableName
    ) -> (i32, u64) { ... }
fn db_idx_upsert(
        &mut self,
        code: AccountName,
        scope: ScopeName,
        table: SecondaryTableName,
        payer: AccountName,
        id: u64
    ) { ... } }

Trait for types that are natively supported by EOSIO to be used as secondary keys

Associated Types

Loading content...

Associated Constants

const END: EndFn

Unsafe native end function

const NEXT: NextFn

Unsafe native next function

const PREVIOUS: PreviousFn

Unsafe native previous function

const REMOVE: RemoveFn

Unsafe native remove function

const STORE: StoreFn<Self::NativeType>

Unsafe native store function

const UPDATE: UpdateFn<Self::NativeType>

Unsafe native update function

const LOWERBOUND: LowerboundFn<Self::NativeType>

Unsafe native lowerbound function

const UPPERBOUND: UpperboundFn<Self::NativeType>

Unsafe native upperbound function

const FIND_PRIMARY: FindPrimaryFn<Self::NativeType>

Unsafe native find_primary function

const FIND_SECONDARY: FindSecondaryFn<Self::NativeType>

Unsafe native find_secondary function

const DATA_LEN: u32

Loading content...

Required methods

fn as_ptr(&self) -> *const Self::NativeType

fn as_mut_ptr(&mut self) -> *mut Self::NativeType

Loading content...

Provided methods

#[must_use] fn db_idx_end(
    code: AccountName,
    scope: ScopeName,
    table: SecondaryTableName
) -> i32

Safe wrapper around unsafe native function

#[must_use] fn db_idx_next(iterator: i32) -> (i32, u64)

Safe wrapper around unsafe native function

#[must_use] fn db_idx_previous(iterator: i32) -> (i32, u64)

Safe wrapper around unsafe native function

fn db_idx_remove(iterator: i32)

Safe wrapper around unsafe native function

fn db_idx_store(
    &self,
    scope: ScopeName,
    table: SecondaryTableName,
    payer: AccountName,
    id: u64
) -> i32

Safe wrapper around unsafe native function

fn db_idx_update(&self, iterator: i32, payer: AccountName)

Safe wrapper around unsafe native function

fn db_idx_lowerbound(
    &mut self,
    code: AccountName,
    scope: ScopeName,
    table: SecondaryTableName
) -> (i32, u64)

Safe wrapper around unsafe native function

fn db_idx_upperbound(
    &mut self,
    code: AccountName,
    scope: ScopeName,
    table: SecondaryTableName
) -> (i32, u64)

Safe wrapper around unsafe native function

fn db_idx_find_primary(
    &mut self,
    code: AccountName,
    scope: ScopeName,
    table: SecondaryTableName,
    primary: u64
) -> i32

Safe wrapper around unsafe native function

fn db_idx_find_secondary(
    &self,
    code: AccountName,
    scope: ScopeName,
    table: SecondaryTableName
) -> (i32, u64)

Safe wrapper around unsafe native function

fn db_idx_upsert(
    &mut self,
    code: AccountName,
    scope: ScopeName,
    table: SecondaryTableName,
    payer: AccountName,
    id: u64
)

Safe wrapper around unsafe native function

Loading content...

Implementors

impl NativeSecondaryKey for [u8; 32][src]

impl NativeSecondaryKey for f64[src]

impl NativeSecondaryKey for u64[src]

impl NativeSecondaryKey for u128[src]

Loading content...