Trait salsa::Query[][src]

pub trait Query: Debug + Default + Sized + for<'d> QueryDb<'d> {
    type Key: Clone + Debug + Hash + Eq;
    type Value: Clone + Debug;
    type Storage;

    const QUERY_INDEX: u16;
    const QUERY_NAME: &'static str;

    fn query_storage<'a>(
        group_storage: &'a Self::GroupStorage
    ) -> &'a Arc<Self::Storage>; }

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

Associated Types

type Key: Clone + Debug + Hash + Eq[src]

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[src]

What value does the query return?

type Storage[src]

Internal struct storing the values for the query.

Loading content...

Associated Constants

const QUERY_INDEX: u16[src]

A unique index identifying this query within the group.

const QUERY_NAME: &'static str[src]

Name of the query method (e.g., foo)

Loading content...

Required methods

fn query_storage<'a>(
    group_storage: &'a Self::GroupStorage
) -> &'a Arc<Self::Storage>
[src]

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

Loading content...

Implementors

Loading content...