MapQuery

Trait MapQuery 

Source
pub trait MapQuery {
    type Query: ReadOnlyQueryData;
    type Output;

    // Required method
    fn map(data: <Self::Query as QueryData>::Item<'_, '_>) -> Self::Output;
}
Expand description

A trait for types that can be constructed from query data.

See Get for more information on usage.

Required Associated Types§

Source

type Query: ReadOnlyQueryData

The query type which this type can be constructed from.

Source

type Output

The output type that this query will map to.

Required Methods§

Source

fn map(data: <Self::Query as QueryData>::Item<'_, '_>) -> Self::Output

Called at the time of query execution to map the query data into Self.

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§