pub struct MembersQuery {
pub queries: Vec<String>,
pub filter: Vec<MembersFilter>,
pub result_control: Option<ResultControl>,
}Expand description
Used to construct a query that targets crossref Member elements
§Example
use crossref_client::{MembersFilter, MembersQuery, ResultControl};
let query = MembersQuery::new("Elsevier")
.filter(MembersFilter::CurrentDoiCount(1000))
.result_control(ResultControl::Rows(10));The route takes terms, filters 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<MembersFilter>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 MembersQuery
impl MembersQuery
Sourcepub fn filter(self, filter: MembersFilter) -> Self
pub fn filter(self, filter: MembersFilter) -> 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 MembersQuery
impl Clone for MembersQuery
Source§impl CrossrefRoute for MembersQuery
impl CrossrefRoute for MembersQuery
Source§impl Debug for MembersQuery
impl Debug for MembersQuery
Source§impl Default for MembersQuery
impl Default for MembersQuery
impl Eq for MembersQuery
Source§impl PartialEq for MembersQuery
impl PartialEq for MembersQuery
impl StructuralPartialEq for MembersQuery
Auto Trait Implementations§
impl Freeze for MembersQuery
impl RefUnwindSafe for MembersQuery
impl Send for MembersQuery
impl Sync for MembersQuery
impl Unpin for MembersQuery
impl UnsafeUnpin for MembersQuery
impl UnwindSafe for MembersQuery
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.