[][src]Trait salsa::Query

pub trait Query<DB: Database>: Debug + Default + Sized + 'static {
    type Key: Clone + Debug + Hash + Eq;
    type Value: Clone + Debug;
    type Storage: QueryStorageOps<DB, Self>;
    type Group: QueryGroup<DB, GroupStorage = Self::GroupStorage, GroupKey = Self::GroupKey>;
    type GroupStorage;
    type GroupKey;
    fn query_storage(group_storage: &Self::GroupStorage) -> &Self::Storage;
fn group_key(key: Self::Key) -> Self::GroupKey; }

Trait implements by all of the "special types" associated with each of your queries.

Associated Types

type Key: Clone + Debug + Hash + Eq

Type that you you give as a parameter -- for queries with zero or more than one input, this will be a tuple.

type Value: Clone + Debug

What value does the query return?

type Storage: QueryStorageOps<DB, Self>

Internal struct storing the values for the query.

type Group: QueryGroup<DB, GroupStorage = Self::GroupStorage, GroupKey = Self::GroupKey>

Associate query group struct.

type GroupStorage

Generated struct that contains storage for all queries in a group.

type GroupKey

Type that identifies a particular query within the group + its key.

Loading content...

Required methods

fn query_storage(group_storage: &Self::GroupStorage) -> &Self::Storage

Extact storage for this query from the storage for its group.

fn group_key(key: Self::Key) -> Self::GroupKey

Create group key for this query.

Loading content...

Implementors

Loading content...