# ResourceQuery in maplibre::tcs::resources - Rust
API documentation for the Rust `ResourceQuery` trait in crate `maplibre`.

# Trait maplibre::tcs::resources::ResourceQuery

source ·

    pub trait ResourceQuery {
        type Item<'r>;
        type State<'s>: QueryState<'s>;

        // Required method
        fn query<'r, 's>(
            resources: &'r Resources,
            state: Self::State<'s>
        ) -> Option<Self::Item<'r>>;
    }

## Required Associated Types§

source

#### type Item<'r>

source

#### type State<'s>: QueryState<'s>

## Required Methods§

source

#### fn query<'r, 's>( resources: &'r Resources, state: Self::State<'s> ) -> Option<Self::Item<'r>>

## Object Safety§

This trait is not object safe.

## Implementations on Foreign Types§

source §

### impl<'a, R: Resource> ResourceQuery for &'a R

§

#### type Item<'r> = &'r R

§

#### type State<'s> = EphemeralQueryState<'s>

source §

#### fn query<'r, 's>( resources: &'r Resources, _state: Self::State<'s> ) -> Option<Self::Item<'r>>

source §

### impl<R1: ResourceQuery> ResourceQuery for (R1,)

§

#### type Item<'r> = (<R1 as ResourceQuery>::Item<'r>,)

§

#### type State<'s> = EphemeralQueryState<'s>

source §

#### fn query<'r, 's>( resources: &'r Resources, state: Self::State<'s> ) -> Option<Self::Item<'r>>

source §

### impl<R1: ResourceQuery, R2: ResourceQuery> ResourceQuery for (R1, R2)

§

#### type Item<'r> = (<R1 as ResourceQuery>::Item<'r>, <R2 as ResourceQuery>::Item<'r>)

§

#### type State<'s> = EphemeralQueryState<'s>

source §

#### fn query<'r, 's>( resources: &'r Resources, state: Self::State<'s> ) -> Option<Self::Item<'r>>

source §

### impl<R1: ResourceQuery, R2: ResourceQuery, R3: ResourceQuery> ResourceQuery for (R1, R2, R3)

§

#### type Item<'r> = (<R1 as ResourceQuery>::Item<'r>, <R2 as ResourceQuery>::Item<'r>, <R3 as ResourceQuery>::Item<'r>)

§

#### type State<'s> = EphemeralQueryState<'s>

source §

#### fn query<'r, 's>( resources: &'r Resources, state: Self::State<'s> ) -> Option<Self::Item<'r>>

source §

### impl<R1: ResourceQuery, R2: ResourceQuery, R3: ResourceQuery, R4: ResourceQuery> ResourceQuery for (R1, R2, R3, R4)

§

#### type Item<'r> = (<R1 as ResourceQuery>::Item<'r>, <R2 as ResourceQuery>::Item<'r>, <R3 as ResourceQuery>::Item<'r>, <R4 as ResourceQuery>::Item<'r>)

§

#### type State<'s> = EphemeralQueryState<'s>

source §

#### fn query<'r, 's>( resources: &'r Resources, state: Self::State<'s> ) -> Option<Self::Item<'r>>

source §

### impl<R1: ResourceQuery, R2: ResourceQuery, R3: ResourceQuery, R4: ResourceQuery, R5: ResourceQuery> ResourceQuery for (R1, R2, R3, R4, R5)

§

#### type Item<'r> = (<R1 as ResourceQuery>::Item<'r>, <R2 as ResourceQuery>::Item<'r>, <R3 as ResourceQuery>::Item<'r>, <R4 as ResourceQuery>::Item<'r>, <R5 as ResourceQuery>::Item<'r>)

§

#### type State<'s> = EphemeralQueryState<'s>

source §

#### fn query<'r, 's>( resources: &'r Resources, state: Self::State<'s> ) -> Option<Self::Item<'r>>

source §

### impl<R1: ResourceQuery, R2: ResourceQuery, R3: ResourceQuery, R4: ResourceQuery, R5: ResourceQuery, R6: ResourceQuery> ResourceQuery for (R1, R2, R3, R4, R5, R6)

§

#### type Item<'r> = (<R1 as ResourceQuery>::Item<'r>, <R2 as ResourceQuery>::Item<'r>, <R3 as ResourceQuery>::Item<'r>, <R4 as ResourceQuery>::Item<'r>, <R5 as ResourceQuery>::Item<'r>, <R6 as ResourceQuery>::Item<'r>)

§

#### type State<'s> = EphemeralQueryState<'s>

source §

#### fn query<'r, 's>( resources: &'r Resources, state: Self::State<'s> ) -> Option<Self::Item<'r>>

## Implementors§