pub enum FieldQuery {
Show 21 variants
Title(String),
ContainerTitle(String),
Author(String),
Editor(String),
Chair(String),
Translator(String),
Contributor(String),
Bibliographic(String),
Affiliation(String),
Degree(String),
Description(String),
EventAcronym(String),
EventLocation(String),
EventName(String),
EventSponsor(String),
EventTheme(String),
FunderName(String),
PublisherLocation(String),
PublisherName(String),
StandardsBodyAcronym(String),
StandardsBodyName(String),
}Expand description
Matches against one field of a work’s metadata rather than all of
it. Available on the /works route only.
assert_eq!("query.author", FieldQuery::author("feynman").name());Covers all 21 field queries /works accepts, which
every_field_query_is_accepted_by_the_api pins against what the api
reports.
Variants§
Title(String)
matches against title:
titles, including the subtitle
ContainerTitle(String)
matches against container-title:
the title of the containing work, aka publication.name
Author(String)
matches against author:
author given and family names
Editor(String)
matches against editor:
editor given and family names
Chair(String)
matches against chair:
chair given and family names
Translator(String)
matches against translator:
translator given and family names
Contributor(String)
matches against contributor:
author, editor, chair and translator given and family names
Bibliographic(String)
matches against bibliographic:
bibliographic information, useful for citation look up. Includes
titles, authors, ISSNs and publication years
Affiliation(String)
matches against affiliation:
contributor affiliations
Degree(String)
matches against degree:
the degree a dissertation was awarded for
Description(String)
matches against description:
the description deposited for posted content
EventAcronym(String)
matches against event-acronym:
the short form of an event’s name
EventLocation(String)
matches against event-location:
where an event was held
EventName(String)
matches against event-name:
an event’s name
EventSponsor(String)
matches against event-sponsor:
who sponsored an event
EventTheme(String)
matches against event-theme:
an event’s theme
FunderName(String)
matches against funder-name:
the name of a funding body, for works whose funder carries no registry DOI
PublisherLocation(String)
matches against publisher-location:
where the publisher is located
PublisherName(String)
matches against publisher-name:
the publisher’s name
StandardsBodyAcronym(String)
matches against standards-body-acronym:
the short form of a standards body’s name
StandardsBodyName(String)
matches against standards-body-name:
the name of the body that issued a standard
Implementations§
Source§impl FieldQuery
impl FieldQuery
Sourcepub const ALL_FIELDS: &'static [&'static str]
pub const ALL_FIELDS: &'static [&'static str]
Every field /works can be queried against, in declaration
order – the author of query.author.
Sourcepub fn name(&self) -> &'static str
pub fn name(&self) -> &'static str
the key this renders under in the query string, e.g. query.author
Sourcepub fn from_field(field: &str, value: impl Into<String>) -> Option<Self>
pub fn from_field(field: &str, value: impl Into<String>) -> Option<Self>
The query against the field crossref knows by this name, the
inverse of FieldQuery::field, or None if /works
carries no such field. For callers that learn the field at
runtime – a command line flag, a config file – rather than
writing it out.
assert_eq!(
Some(FieldQuery::author("feynman")),
FieldQuery::from_field("author", "feynman")
);
assert_eq!(None, FieldQuery::from_field("query.author", "feynman"));Sourcepub fn container_title(value: impl Into<String>) -> Self
pub fn container_title(value: impl Into<String>) -> Self
a query against container-title
a query against author
Sourcepub fn translator(value: impl Into<String>) -> Self
pub fn translator(value: impl Into<String>) -> Self
a query against translator
Sourcepub fn contributor(value: impl Into<String>) -> Self
pub fn contributor(value: impl Into<String>) -> Self
a query against contributor
Sourcepub fn bibliographic(value: impl Into<String>) -> Self
pub fn bibliographic(value: impl Into<String>) -> Self
a query against bibliographic
Sourcepub fn affiliation(value: impl Into<String>) -> Self
pub fn affiliation(value: impl Into<String>) -> Self
a query against affiliation
Sourcepub fn description(value: impl Into<String>) -> Self
pub fn description(value: impl Into<String>) -> Self
a query against description
Sourcepub fn event_acronym(value: impl Into<String>) -> Self
pub fn event_acronym(value: impl Into<String>) -> Self
a query against event-acronym
Sourcepub fn event_location(value: impl Into<String>) -> Self
pub fn event_location(value: impl Into<String>) -> Self
a query against event-location
Sourcepub fn event_name(value: impl Into<String>) -> Self
pub fn event_name(value: impl Into<String>) -> Self
a query against event-name
Sourcepub fn event_sponsor(value: impl Into<String>) -> Self
pub fn event_sponsor(value: impl Into<String>) -> Self
a query against event-sponsor
Sourcepub fn event_theme(value: impl Into<String>) -> Self
pub fn event_theme(value: impl Into<String>) -> Self
a query against event-theme
Sourcepub fn funder_name(value: impl Into<String>) -> Self
pub fn funder_name(value: impl Into<String>) -> Self
a query against funder-name
Sourcepub fn publisher_location(value: impl Into<String>) -> Self
pub fn publisher_location(value: impl Into<String>) -> Self
a query against publisher-location
Sourcepub fn publisher_name(value: impl Into<String>) -> Self
pub fn publisher_name(value: impl Into<String>) -> Self
a query against publisher-name
Sourcepub fn standards_body_acronym(value: impl Into<String>) -> Self
pub fn standards_body_acronym(value: impl Into<String>) -> Self
a query against standards-body-acronym
Sourcepub fn standards_body_name(value: impl Into<String>) -> Self
pub fn standards_body_name(value: impl Into<String>) -> Self
a query against standards-body-name
Trait Implementations§
Source§impl Clone for FieldQuery
impl Clone for FieldQuery
Source§impl CrossrefQueryParam for FieldQuery
impl CrossrefQueryParam for FieldQuery
Source§impl Debug for FieldQuery
impl Debug for FieldQuery
impl Eq for FieldQuery
Source§impl PartialEq for FieldQuery
impl PartialEq for FieldQuery
impl StructuralPartialEq for FieldQuery
Auto Trait Implementations§
impl Freeze for FieldQuery
impl RefUnwindSafe for FieldQuery
impl Send for FieldQuery
impl Sync for FieldQuery
impl Unpin for FieldQuery
impl UnsafeUnpin for FieldQuery
impl UnwindSafe for FieldQuery
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
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
key and return true if they are equal.