pub struct DoiOrg { /* private fields */ }Implementations§
Source§impl DoiOrg
impl DoiOrg
pub fn new(config: DoiConfig, http: Arc<dyn HttpClient>) -> Self
Sourcepub fn default_policy() -> ResiliencePolicy
pub fn default_policy() -> ResiliencePolicy
Agencies advertise about 10 req/s; stay well under.
Trait Implementations§
Source§impl Provider for DoiOrg
impl Provider for DoiOrg
fn id(&self) -> ProviderId
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,
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.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,
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,
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,
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> 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