Skip to main content

CrossrefQueryParam

Trait CrossrefQueryParam 

Source
pub trait CrossrefQueryParam {
    // Required method
    fn params(&self) -> Vec<(Cow<'_, str>, Cow<'_, str>)>;
}
Expand description

a trait used to capture parameters for the query string of the crossref api

Required Methods§

Source

fn params(&self) -> Vec<(Cow<'_, str>, Cow<'_, str>)>

The key/value pairs this element contributes to the query string.

Most elements contribute exactly one pair, but a few span two – ResultControl::RowsOffset and works::WorkResultControl::Cursor with a row limit. Yielding pairs rather than a rendered key=value fragment is what lets the route builder percent-encode keys and values separately.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CrossrefQueryParam for Vec<FacetCount>

Source§

fn params(&self) -> Vec<(Cow<'_, str>, Cow<'_, str>)>

facets share the facet key and are concat with ,

Source§

impl<T: AsRef<str>> CrossrefQueryParam for (T, T)

Source§

fn params(&self) -> Vec<(Cow<'_, str>, Cow<'_, str>)>

Source§

impl<T: Filter> CrossrefQueryParam for Vec<T>

Source§

fn params(&self) -> Vec<(Cow<'_, str>, Cow<'_, str>)>

filters share the filter key and are concat with ,

Implementors§