Trait Table

Source
pub trait Table: Sized {
    type Row: Read + Write + NumBytes;

    const NAME: TableName;

    // Required method
    fn primary_key(row: &Self::Row) -> u64;

    // Provided methods
    fn secondary_keys(_row: &Self::Row) -> SecondaryKeys { ... }
    fn table<C, S>(code: C, scope: S) -> PrimaryTableIndex<Self>
       where C: Into<AccountName>,
             S: Into<ScopeName> { ... }
}
Expand description

TODO docs

Required Associated Constants§

Source

const NAME: TableName

TODO docs

Required Associated Types§

Source

type Row: Read + Write + NumBytes

TODO docs

Required Methods§

Source

fn primary_key(row: &Self::Row) -> u64

TODO docs

Provided Methods§

Source

fn secondary_keys(_row: &Self::Row) -> SecondaryKeys

TODO docs

Source

fn table<C, S>(code: C, scope: S) -> PrimaryTableIndex<Self>
where C: Into<AccountName>, S: Into<ScopeName>,

TODO docs

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.

Implementors§