pub struct FundersQuery {
pub queries: Vec<String>,
pub filter: Vec<FundersFilter>,
pub result_control: Option<ResultControl>,
}Expand description
Used to construct a query that targets crossref Funder elements
§Example
use crossref_client::{FundersFilter, FundersQuery, ResultControl};
let query = FundersQuery::new("NSF")
.filter(FundersFilter::Location("Norway".to_string()))
.result_control(ResultControl::Rows(10));The route takes terms, one filter and paging. It used to also offer
sort, order and facet, which crossref answers with a 400.
Fields§
§queries: Vec<String>search by non specific query
filter: Vec<FundersFilter>filter to apply while querying
result_control: Option<ResultControl>limit the returned items and set an offset
Only rows and offset are supported by this route;
ResultControl::Sample is rejected by crossref with a 400.
Implementations§
Source§impl FundersQuery
impl FundersQuery
Sourcepub fn filter(self, filter: FundersFilter) -> Self
pub fn filter(self, filter: FundersFilter) -> Self
add a new filter to the query
Sourcepub fn new<T: ToString>(query: T) -> Self
pub fn new<T: ToString>(query: T) -> Self
Convenience method to create a new query with a term directly
Sourcepub fn result_control(
self,
result_control: impl Into<Option<ResultControl>>,
) -> Self
pub fn result_control( self, result_control: impl Into<Option<ResultControl>>, ) -> Self
Limit the results, or take crossref’s default page if given None.
Trait Implementations§
Source§impl Clone for FundersQuery
impl Clone for FundersQuery
Source§impl CrossrefRoute for FundersQuery
impl CrossrefRoute for FundersQuery
Source§impl Debug for FundersQuery
impl Debug for FundersQuery
Source§impl Default for FundersQuery
impl Default for FundersQuery
impl Eq for FundersQuery
Source§impl PartialEq for FundersQuery
impl PartialEq for FundersQuery
impl StructuralPartialEq for FundersQuery
Auto Trait Implementations§
impl Freeze for FundersQuery
impl RefUnwindSafe for FundersQuery
impl Send for FundersQuery
impl Sync for FundersQuery
impl Unpin for FundersQuery
impl UnsafeUnpin for FundersQuery
impl UnwindSafe for FundersQuery
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.