MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / inject_env

Method inject_env

crates/openshell-providers/src/lib.rs:168–175  ·  view source on GitHub ↗

Inject provider-specific env vars via the registered plugin. Normalizes the provider type and delegates to the plugin's `inject_env`. No-op if the provider type has no registered plugin or the plugin's default implementation is a no-op.

(&self, provider: &Provider, env: &mut HashMap<String, String>)

Source from the content-addressed store, hash-verified

166 /// No-op if the provider type has no registered plugin or the plugin's
167 /// default implementation is a no-op.
168 pub fn inject_env(&self, provider: &Provider, env: &mut HashMap<String, String>) {
169 let normalized = normalize_provider_type(&provider.r#type);
170 if let Some(id) = normalized
171 && let Some(plugin) = self.get(id)
172 {
173 plugin.inject_env(provider, env);
174 }
175 }
176
177 #[must_use]
178 pub fn known_types(&self) -> Vec<&'static str> {

Calls 2

normalize_provider_typeFunction · 0.85
getMethod · 0.45