Struct odata_simple_client::ListRequest[][src]

pub struct ListRequest { /* fields omitted */ }
Expand description

Request a list of resources.

Implementations

Change format of the returned data.

Can be either Format::Json or Format::Xml

Order the returned resources by field, in specified direction. Direction::Ascending by default.

Only retrieve the top count items.

Skip the first count items.

Include an inline count field in the odata page metadata. Useful for gauging how many results/pages are left. By default this is not specified, which implies InlineCount::None

Filter the returned results using an OData conditional expression.

See the OData 2.0 documentation (section 4.5) for more information.

#[derive(Deserialize, Debug)]
struct Dokument {
    titel: String,
}

let page: Page<Dokument> = datasource
    .fetch_paged(ListRequest::new("Dokument")
        .filter("id", Comparison::Equal, "24")
    ).await.unwrap();
assert_eq!(page.value[0].titel, "Grund- og nærhedsnotat vedr. sanktioner på toldområdet")

Expand specific relations of the returned object, if possible.

For the Folketinget API for example, you can expand the DokumentAktør field of a Dokument, to simultaneously retrieve information about the document authors, instead of having to do two separate lookups for the DokumentAktør relation and then the actual Aktør.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more