Skip to main content

DoiOrg

Struct DoiOrg 

Source
pub struct DoiOrg { /* private fields */ }

Implementations§

Source§

impl DoiOrg

Source

pub fn new(config: DoiConfig, http: Arc<dyn HttpClient>) -> Self

Source

pub fn default_policy() -> ResiliencePolicy

Agencies advertise about 10 req/s; stay well under.

Trait Implementations§

Source§

impl Provider for DoiOrg

Source§

fn id(&self) -> ProviderId

Source§

fn capabilities(&self) -> &Capabilities

Source§

fn lookup<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [WorkId], _fields: FieldSet, ) -> Pin<Box<dyn Future<Output = Result<Response<Vec<Lookup>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Looks up works by ID. One Lookup per input, in input order. Callers pass at most max_batch IDs, all of a kind in lookup_kinds.
Source§

fn search<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 SearchQuery, ) -> Pin<Box<dyn Future<Output = Result<Response<Page>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source§

fn citations<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 WorkId, page: &'life2 PageReq, fields: FieldSet, ) -> Pin<Box<dyn Future<Output = Result<Response<Page>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Works that cite id.
Source§

fn references<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 WorkId, page: &'life2 PageReq, fields: FieldSet, ) -> Pin<Box<dyn Future<Output = Result<Response<Page>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Works that id cites.
Source§

fn recommend<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, positive: &'life1 [WorkId], negative: &'life2 [WorkId], page: &'life3 PageReq, fields: FieldSet, ) -> Pin<Box<dyn Future<Output = Result<Response<Page>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait,

Works similar to positive and unlike negative.

Auto Trait Implementations§

§

impl !RefUnwindSafe for DoiOrg

§

impl !UnwindSafe for DoiOrg

§

impl Forget for DoiOrg

§

impl Freeze for DoiOrg

§

impl Send for DoiOrg

§

impl Sync for DoiOrg

§

impl Unpin for DoiOrg

§

impl UnsafeUnpin for DoiOrg

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.