pub struct RealmConfigSection {
pub backend: BTreeMap<String, BackendProfileConfig>,
pub auth: BTreeMap<String, AuthProfileConfig>,
pub binding: BTreeMap<String, ProviderBindingConfig>,
pub default_binding: Option<String>,
}Expand description
Ingestion wrapper for [realm.<id>.*] TOML tables.
The singular nouns backend/auth/binding match TOML dotted-key
notation ([realm.dev.backend.openai_default]) so that one .backend.X
table becomes one entry in the backend map.
Fields§
§backend: BTreeMap<String, BackendProfileConfig>§auth: BTreeMap<String, AuthProfileConfig>§binding: BTreeMap<String, ProviderBindingConfig>§default_binding: Option<String>Implementations§
Source§impl RealmConfigSection
impl RealmConfigSection
Sourcepub fn from_inline_api_keys(entries: &[(&str, &str)]) -> Self
pub fn from_inline_api_keys(entries: &[(&str, &str)]) -> Self
Programmatic constructor for a realm populated from per-provider
inline api keys. Used by surfaces (notably the WASM browser
runtime) that receive credentials as plain strings at bootstrap
and need to translate them into the realm-based config shape
consumed by AgentFactory::build_agent.
For each (provider, secret) pair, emits:
- a
BackendProfileConfig { provider, backend_kind: "<p>_api" } - an
AuthProfileConfigwithCredentialSourceSpec::InlineSecret - a
ProviderBindingConfigwiring the two
The first provider in the input list becomes the
default_binding so that build_agent’s auth_binding-less
code path can resolve through this realm. Plan §6.10 replacement
for the deleted ProviderSettings.api_keys map.
Trait Implementations§
Source§impl Clone for RealmConfigSection
impl Clone for RealmConfigSection
Source§fn clone(&self) -> RealmConfigSection
fn clone(&self) -> RealmConfigSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RealmConfigSection
impl Debug for RealmConfigSection
Source§impl Default for RealmConfigSection
impl Default for RealmConfigSection
Source§fn default() -> RealmConfigSection
fn default() -> RealmConfigSection
Source§impl<'de> Deserialize<'de> for RealmConfigSection
impl<'de> Deserialize<'de> for RealmConfigSection
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>,
Source§impl JsonSchema for RealmConfigSection
impl JsonSchema for RealmConfigSection
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for RealmConfigSection
impl PartialEq for RealmConfigSection
Source§fn eq(&self, other: &RealmConfigSection) -> bool
fn eq(&self, other: &RealmConfigSection) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RealmConfigSection
impl Serialize for RealmConfigSection
impl Eq for RealmConfigSection
impl StructuralPartialEq for RealmConfigSection
Auto Trait Implementations§
impl Freeze for RealmConfigSection
impl RefUnwindSafe for RealmConfigSection
impl Send for RealmConfigSection
impl Sync for RealmConfigSection
impl Unpin for RealmConfigSection
impl UnsafeUnpin for RealmConfigSection
impl UnwindSafe for RealmConfigSection
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.