Skip to main content

WorksFilter

Enum WorksFilter 

Source
pub enum WorksFilter {
Show 90 variants HasFunder, HasFunderDoi, HasFunderRorId, HasAffiliation, HasAffiliationRorId, HasRorId, HasLicense, HasFullText, HasReferences, HasArchive, HasOrcid, HasAuthenticatedOrcid, HasAbstract, HasClinicalTrialNumber, HasContentDomain, HasDomainRestriction, HasRelation, HasUpdate, HasUpdatePolicy, HasAssertion, HasAward, HasAlias, HasPrimeDoi, HasEvent, IsUpdate, Funder(String), Prefix(String), Member(String), Doi(String), Issn(String), Isbn(String), Orcid(String), Archive(String), Directory(String), Updates(String), ContainerTitle(String), CategoryName(String), TypeName(String), Type(Type), GroupTitle(String), ContentDomain(String), ClinicalTrialNumber(String), AlternativeId(String), ArticleNumber(String), RorId(String), UpdateType(String), FunderDoiAssertedBy(String), Assertion(String), AssertionGroup(String), AwardNumber(String), AwardFunder(String), GteAwardAmount(u64), LteAwardAmount(u64), LicenseUrl(String), LicenseVersion(String), LicenseDelay(i32), FullTextVersion(String), FullTextType(String), FullTextApplication(String), RelationType(String), RelationObject(String), RelationObjectType(String), FromIndexDate(NaiveDate), UntilIndexDate(NaiveDate), FromDepositDate(NaiveDate), UntilDepositDate(NaiveDate), FromUpdateDate(NaiveDate), UntilUpdateDate(NaiveDate), FromCreatedDate(NaiveDate), UntilCreatedDate(NaiveDate), FromPubDate(NaiveDate), UntilPubDate(NaiveDate), FromOnlinePubDate(NaiveDate), UntilOnlinePubDate(NaiveDate), FromPrintPubDate(NaiveDate), UntilPrintPubDate(NaiveDate), FromPostedDate(NaiveDate), UntilPostedDate(NaiveDate), FromAcceptedDate(NaiveDate), UntilAcceptedDate(NaiveDate), FromApprovedDate(NaiveDate), UntilApprovedDate(NaiveDate), FromAwardedDate(NaiveDate), UntilAwardedDate(NaiveDate), FromIssuedDate(NaiveDate), UntilIssuedDate(NaiveDate), FromEventStartDate(NaiveDate), UntilEventStartDate(NaiveDate), FromEventEndDate(NaiveDate), UntilEventEndDate(NaiveDate),
}
Expand description

Narrows a /works query. Every filter is ANDed with the others.

Covers all 90 filters /works accepts; crossref answers an unrecognised one with Error::ValidationFailure naming the ones it does know, which is what every_works_filter_is_accepted_by_the_api pins this list against.

Note that location and reference-visibility are not among them – location belongs to FundersFilter.

A value carrying a , cannot be sent at all, whatever the filter: crossref splits the filter parameter on it after decoding, so the query is refused with Error::UnsendableFilterValue.

Variants§

§

HasFunder

metadata which includes one or more funder entry

§

HasFunderDoi

metadata where a funder entry carries a Funder Registry DOI

§

HasFunderRorId

metadata where a funder entry carries a ROR id

§

HasAffiliation

metadata for records that have any affiliation information

§

HasAffiliationRorId

metadata where an affiliation carries a ROR id

§

HasRorId

metadata carrying a ROR id anywhere

§

HasLicense

metadata that includes any <license_ref> elements

§

HasFullText

metadata that includes any full text <resource> elements

§

HasReferences

metadata for works that have a list of references

§

HasArchive

metadata which include name of archive partner

§

HasOrcid

metadata which includes one or more ORCIDs

§

HasAuthenticatedOrcid

metadata which includes one or more ORCIDs where the depositing publisher claims to have witness the ORCID owner authenticate with ORCID

§

HasAbstract

metadata for records which include an abstract

§

HasClinicalTrialNumber

metadata for records which include a clinical trial number

§

HasContentDomain

metadata where the publisher records a domain name location for Crossmark content

§

HasDomainRestriction

metadata where the publisher restricts Crossmark usage to content domains

§

HasRelation

metadata for records that either assert or are the object of a relation

§

HasUpdate

metadata for records that carry an editorial update

§

HasUpdatePolicy

metadata for records that include a link to an editorial update policy

§

HasAssertion

metadata for records with any assertions

§

HasAward

metadata for records that carry award information

§

HasAlias

metadata for records deposited under more than one DOI

§

HasPrimeDoi

metadata for records that are the primary DOI of an alias group

§

HasEvent

metadata for records that describe an event

§

IsUpdate

metadata for records that represent editorial updates

§

Funder(String)

metadata which include the id in FundRef data

§

Prefix(String)

metadata belonging to a DOI owner prefix {owner_prefix} (e.g. 10.1016 )

§

Member(String)

metadata belonging to a Crossref member

§

Doi(String)

metadata describing the DOI

§

Issn(String)

metadata where record has an ISSN = the value. Format is xxxx-xxxx

§

Isbn(String)

metadata where record has an ISBN = the value

§

Orcid(String)

metadata where <orcid> element’s value = the value

§

Archive(String)

metadata which where value of archive partner is the value

§

Directory(String)

metadata records whose article or serial are mentioned in the given value. Currently the only supported value is doaj

§

Updates(String)

metadata for records that represent editorial updates to the DOI

§

ContainerTitle(String)

metadata for records with a publication title exactly with an exact match

§

CategoryName(String)

metadata for records with an exact matching category label. Category labels come from this list published by Scopus

§

TypeName(String)

metadata for records with an exacty matching type label

§

Type(Type)

metadata records whose type = value. Type must be an ID value from the list of types returned by the /types resource

§

GroupTitle(String)

metadata for records with a matching group title, as deposited for posted content

§

ContentDomain(String)

metadata where the publisher records a particular domain name as the location Crossmark content will appear

§

ClinicalTrialNumber(String)

metadata for records carrying the given clinical trial number

§

AlternativeId(String)

metadata for records with the given alternative ID, which may be a publisher-specific ID, or any other identifier a publisher may have provided

§

ArticleNumber(String)

metadata for records with a given article number

§

RorId(String)

metadata carrying the given ROR id, the identifier crossref now models affiliations and funders with

§

UpdateType(String)

metadata for editorial updates of the given kind, e.g. correction or retraction

§

FunderDoiAssertedBy(String)

metadata where a funder’s DOI was asserted by the value, either crossref or publisher

§

Assertion(String)

metadata for records with a particular named assertion

§

AssertionGroup(String)

metadata for records with an assertion in a particular group

§

AwardNumber(String)

metadata for records with a matching award number. Optionally combine with award.funder

§

AwardFunder(String)

metadata for records with an award with matching funder. Optionally combine with award.number

§

GteAwardAmount(u64)

metadata for records with an award of at least this amount

§

LteAwardAmount(u64)

metadata for records with an award of at most this amount

§

LicenseUrl(String)

metadata where <license_ref> value equals the value

§

LicenseVersion(String)

metadata where the <license_ref>’s applies_to attribute is

§

LicenseDelay(i32)

metadata where difference between publication date and the <license_ref>’s start_date attribute is <= value (in days)

§

FullTextVersion(String)

metadata where <resource> element’s content_version attribute is the value

§

FullTextType(String)

metadata where <resource> element’s content_type attribute is value (e.g. application/pdf)

§

FullTextApplication(String)

metadata where <resource> link has one of the following intended applications: text-mining, similarity-checking or unspecified

§

RelationType(String)

One of the relation types from the Crossref relations schema (e.g. is-referenced-by, is-parent-of, is-preprint-of)

§

RelationObject(String)

Relations where the object identifier matches the identifier provided

§

RelationObjectType(String)

One of the identifier types from the Crossref relations schema (e.g. doi, issn)

§

FromIndexDate(NaiveDate)

metadata indexed since (inclusive)

§

UntilIndexDate(NaiveDate)

metadata indexed before (inclusive)

§

FromDepositDate(NaiveDate)

metadata last (re)deposited since (inclusive)

§

UntilDepositDate(NaiveDate)

metadata last (re)deposited before (inclusive)

§

FromUpdateDate(NaiveDate)

Metadata updated since (inclusive) {date}. Currently the same as from-deposit-date

§

UntilUpdateDate(NaiveDate)

Metadata updated before (inclusive) {date}. Currently the same as until-deposit-date

§

FromCreatedDate(NaiveDate)

metadata first deposited since (inclusive)

§

UntilCreatedDate(NaiveDate)

metadata first deposited before (inclusive)

§

FromPubDate(NaiveDate)

metadata where published date is since (inclusive)

§

UntilPubDate(NaiveDate)

metadata where published date is before (inclusive)

§

FromOnlinePubDate(NaiveDate)

metadata where online published date is since (inclusive)

§

UntilOnlinePubDate(NaiveDate)

metadata where online published date is before (inclusive)

§

FromPrintPubDate(NaiveDate)

metadata where print published date is since (inclusive)

§

UntilPrintPubDate(NaiveDate)

metadata where print published date is before (inclusive)

§

FromPostedDate(NaiveDate)

metadata where posted date is since (inclusive)

§

UntilPostedDate(NaiveDate)

metadata where posted date is before (inclusive)

§

FromAcceptedDate(NaiveDate)

metadata where accepted date is since (inclusive)

§

UntilAcceptedDate(NaiveDate)

metadata where accepted date is before (inclusive)

§

FromApprovedDate(NaiveDate)

metadata where approved date is since (inclusive)

§

UntilApprovedDate(NaiveDate)

metadata where approved date is before (inclusive)

§

FromAwardedDate(NaiveDate)

metadata where an award was made since (inclusive)

§

UntilAwardedDate(NaiveDate)

metadata where an award was made before (inclusive)

§

FromIssuedDate(NaiveDate)

metadata where issued date is since (inclusive)

§

UntilIssuedDate(NaiveDate)

metadata where issued date is before (inclusive)

§

FromEventStartDate(NaiveDate)

metadata for events starting since (inclusive)

§

UntilEventStartDate(NaiveDate)

metadata for events starting before (inclusive)

§

FromEventEndDate(NaiveDate)

metadata for events ending since (inclusive)

§

UntilEventEndDate(NaiveDate)

metadata for events ending before (inclusive)

Implementations§

Source§

impl WorksFilter

Source

pub const ALL_NAMES: &'static [&'static str]

Every filter name this route accepts, in declaration order.

Pinned against the list crossref reports in its 400 body by the coverage tests, so it is the vocabulary of the live api rather than of this crate’s enum.

Source

pub fn name(&self) -> &'static str

the key this filter renders under in the query string

Source

pub fn from_name( name: &str, value: Option<&str>, ) -> Result<Self, FilterParseError>

The filter crossref knows by this name, carrying this value – the inverse of name, for callers that learn a filter at runtime rather than writing it out.

A marker takes no value, or the true it renders as; every other filter takes one, parsed into whatever that filter carries, so a date that is not a date is caught here rather than by crossref.

Trait Implementations§

Source§

impl Clone for WorksFilter

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WorksFilter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for WorksFilter

Source§

impl Filter for WorksFilter

Source§

impl ParamFragment for WorksFilter

Source§

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

the key, or name, of the fragment
Source§

fn value(&self) -> Option<Cow<'_, str>>

the value of the fragment, if any
Source§

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

key and value are concat using :
Source§

impl PartialEq for WorksFilter

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for WorksFilter

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

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

fn in_current_span(self) -> Instrumented<Self> ⓘ

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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