pub trait ResourceQuery {
    type Item;

    const DEFAULT_LIMIT: usize;

    fn can_paginate(&self) -> Result<bool>;
    fn extract_marker(&self, resource: &Self::Item) -> String;
    fn fetch_chunk(
        &self,
        limit: Option<usize>,
        marker: Option<String>
    ) -> Result<Vec<Self::Item>>; fn validate(&mut self) -> Result<()> { ... } }
Expand description

A query for resources.

This is a low-level trait that should not be used directly.

Required Associated Types

Item type.

Required Associated Constants

Default limit to use with this query.

Required Methods

Whether pagination is supported for this query.

Extract a marker from a resource.

Get a chunk of resources.

Provided Methods

Validate the query before the first execution.

This call may modify internal representation of the query, so changing the query after calling it may cause undesired side effects.

Implementors