Skip to main content

TableKey

Trait TableKey 

Source
pub trait TableKey {
    type Table: Table;

    // Required method
    fn table_ref(&self) -> TableRef;

    // Provided method
    fn table_name(&self) -> CapName { ... }
}
Expand description

A typed table key: a value that refers to a table together with its value type, namely a TableName, a TableHandle, or a reference to either.

The read and write methods of ComputedView, StageOut, StageCx and Run, and Externals::install, are generic over this trait, so a caller passes whichever key it has.

Required Associated Types§

Source

type Table: Table

The table’s value type.

Required Methods§

Source

fn table_ref(&self) -> TableRef

The type-erased form of this key.

Provided Methods§

Source

fn table_name(&self) -> CapName

The table’s name.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<K: TableKey + ?Sized> TableKey for &K

Implementors§