[][src]Trait openstack::common::ResourceQuery

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<()> { ... } }
[]

A query for resources.

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

Associated Types

type Item[]

Item type.

Associated Constants

const DEFAULT_LIMIT: usize[]

Default limit to use with this query.

Required methods

fn can_paginate(&self) -> Result<bool>[]

Whether pagination is supported for this query.

fn extract_marker(&self, resource: &Self::Item) -> String[]

Extract a marker from a resource.

fn fetch_chunk(
    &self,
    limit: Option<usize>,
    marker: Option<String>
) -> Result<Vec<Self::Item>>
[]

Get a chunk of resources.

Provided methods

fn validate(&mut self) -> Result<()>[]

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

impl ResourceQuery for DetailedFlavorQuery[src][+]

type Item = Flavor

impl ResourceQuery for DetailedServerQuery[src][+]

type Item = Server

impl ResourceQuery for FlavorQuery[src][+]

type Item = FlavorSummary

impl ResourceQuery for KeyPairQuery[src][+]

type Item = KeyPair

impl ResourceQuery for ServerQuery[src][+]

type Item = ServerSummary

impl ResourceQuery for ImageQuery[src][+]

type Item = Image

impl ResourceQuery for FloatingIpQuery[src][+]

type Item = FloatingIp

impl ResourceQuery for NetworkQuery[src][+]

type Item = Network

impl ResourceQuery for PortQuery[src][+]

type Item = Port

impl ResourceQuery for RouterQuery[src][+]

type Item = Router

impl ResourceQuery for SubnetQuery[src][+]

type Item = Subnet

impl ResourceQuery for ContainerQuery[src][+]

type Item = Container

impl ResourceQuery for ObjectQuery[src][+]

type Item = Object