[][src]Enum crossref::query::works::Works

pub enum Works {
    Identifier(String),
    Query(WorksQuery),
    Agency(String),
}

Retrieve a publication by DOI

Example

This code runs with edition 2018
use crossref::Works;

let works = Works::doi("10.1037/0003-066X.59.1.29");

Target the agency of a specific publication, where the str supplied is corresponded to the publication's DOI

Example

This code runs with edition 2018
use crossref::Works;

let works = Works::agency_for_doi("10.1037/0003-066X.59.1.29");

Variants

Identifier(String)

target a Work by a specific id

Query(WorksQuery)

target Works by a query

Agency(String)

return the registration agency for a DOI

Methods

impl Works[src]

pub fn doi(doi: &str) -> Self[src]

create a new Works::Identifier by converting doi to a String

pub fn agency_for_doi(doi: &str) -> Self[src]

create a new Works::Agency targeting the registration agency for the DOI

Trait Implementations

impl CrossrefRoute for Works[src]

impl CrossrefQuery for Works[src]

fn to_url(&self, base_path: &str) -> Result<String>[src]

constructs the full request url by concating the base_path with the route

impl Clone for Works[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Works[src]

impl Serialize for Works[src]

impl<'de> Deserialize<'de> for Works[src]

Auto Trait Implementations

impl Send for Works

impl Sync for Works

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T

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

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