pub struct ConfigProvider { /* private fields */ }Expand description
A context provider dynamically created from a TOML/JSON config file.
Implementations§
Source§impl ConfigProvider
impl ConfigProvider
Sourcepub fn from_config(config: ProviderConfig) -> Result<Self, String>
pub fn from_config(config: ProviderConfig) -> Result<Self, String>
Create a ConfigProvider from a parsed config.
Leaks the id/name strings — acceptable because providers are registered once at startup and live for the process lifetime.
Trait Implementations§
Source§impl ContextProvider for ConfigProvider
impl ContextProvider for ConfigProvider
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Unique identifier for this provider (e.g. “gitlab”, “github”, “jira”).
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Human-readable display name.
Source§fn supported_actions(&self) -> &[&str]
fn supported_actions(&self) -> &[&str]
Returns the actions this provider supports (e.g. “issues”, “mrs”, “pipelines”).
Source§fn execute(
&self,
action: &str,
params: &ProviderParams,
) -> Result<ProviderResult, String>
fn execute( &self, action: &str, params: &ProviderParams, ) -> Result<ProviderResult, String>
Execute a provider action and return structured results.
Source§fn cache_ttl_secs(&self) -> u64
fn cache_ttl_secs(&self) -> u64
TTL for caching results from this provider (in seconds).
Source§fn descriptor(&self) -> ConnectorDescriptor
fn descriptor(&self) -> ConnectorDescriptor
What this connector actually guarantees (strategy package 2026-10-14,
doc 17). The default claims nothing it cannot prove: it lists, and it
cannot re-check a stored item, so its content stays personal-local and
is withheld from governed reuse.
Source§fn reuse_binding(
&self,
action: &str,
_params: &ProviderParams,
) -> Option<String>
fn reuse_binding( &self, action: &str, _params: &ProviderParams, ) -> Option<String>
Stable, credential-bound identity of a read-only resource. A name alone
does not authorize reuse; providers without this contract remain unbound.
Source§fn reacquire_item(
&self,
action: &str,
params: &ProviderParams,
item_id: &str,
) -> Result<ProviderResult, String>
fn reacquire_item( &self, action: &str, params: &ProviderParams, item_id: &str, ) -> Result<ProviderResult, String>
Fetch current evidence for one previously observed item. Never implement
this with a cached result or a project-only permission probe.
Source§fn requires_auth(&self) -> bool
fn requires_auth(&self) -> bool
Whether this provider requires authentication.
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if the provider is configured and ready to serve requests.
Source§fn consolidates(&self, _action: &str) -> bool
fn consolidates(&self, _action: &str) -> bool
Whether a result of
action is consolidated into the stores (BM25,
cross-source edges, knowledge). A provider whose actions include
reads of something one listing already indexes says false for
them, so a read does not add a second copy and its own hints.Auto Trait Implementations§
impl Forget for ConfigProvider
impl Freeze for ConfigProviderwhere
&'static str: Freeze,
*const u8 is !null: Freeze,
PhantomData<&'static str>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<(String, ResourceConfig)>: Freeze,
impl Move for ConfigProvider
impl RefUnwindSafe for ConfigProvider
impl Send for ConfigProvider
impl Sync for ConfigProvider
impl Unpin for ConfigProvider
impl UnsafeUnpin for ConfigProviderwhere
&'static str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, ResourceConfig)>: UnsafeUnpin,
impl UnwindSafe for ConfigProviderwhere
&'static str: UnwindSafe,
RawVecInner: UnwindSafe,
HashMap<String, ResourceConfig>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
Converts
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> ⓘ
Converts
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