pub struct SourceConfig {
pub enabled_sources: Option<String>,
pub disabled_sources: Option<String>,
pub proxy_http: Option<String>,
pub proxy_https: Option<String>,
pub rate_limits: Option<String>,
}Expand description
Source configuration
Fields§
§enabled_sources: Option<String>Comma-separated list of source IDs to enable (e.g., “arxiv,pubmed,semantic”) Maps to RESEARCH_MASTER_ENABLED_SOURCES environment variable
disabled_sources: Option<String>Comma-separated list of source IDs to disable (e.g., “dblp,jstor”) Maps to RESEARCH_MASTER_DISABLED_SOURCES environment variable
proxy_http: Option<String>Per-source HTTP proxy configuration Format: source_id:proxy_url (e.g., “arxiv:http://proxy:8080”)
proxy_https: Option<String>Per-source HTTPS proxy configuration Format: source_id:proxy_url (e.g., “semantic:https://proxy:8080”)
rate_limits: Option<String>Per-source rate limits (requests per second) Format: source_id:rate (e.g., “semantic:0.5,arxiv:5”) Environment variable: RESEARCH_MASTER_RATE_LIMITS
Implementations§
Source§impl SourceConfig
impl SourceConfig
Sourcepub fn parse_rate_limits(&self) -> HashMap<String, f32>
pub fn parse_rate_limits(&self) -> HashMap<String, f32>
Parse per-source rate limits from config string Format: “source1:rate1,source2:rate2” Example: “semantic:0.5,arxiv:5,openalex:2”
Trait Implementations§
Source§impl Clone for SourceConfig
impl Clone for SourceConfig
Source§fn clone(&self) -> SourceConfig
fn clone(&self) -> SourceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SourceConfig
impl Debug for SourceConfig
Source§impl Default for SourceConfig
impl Default for SourceConfig
Source§impl<'de> Deserialize<'de> for SourceConfig
impl<'de> Deserialize<'de> for SourceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SourceConfig
impl RefUnwindSafe for SourceConfig
impl Send for SourceConfig
impl Sync for SourceConfig
impl Unpin for SourceConfig
impl UnwindSafe for SourceConfig
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more