pub struct EndpointRegistry { /* private fields */ }Expand description
Registry of all configured endpoints with routing logic.
Implementations§
Source§impl EndpointRegistry
impl EndpointRegistry
Sourcepub fn from_config(endpoints: &HashMap<String, EndpointConfig>) -> Self
pub fn from_config(endpoints: &HashMap<String, EndpointConfig>) -> Self
Builds a registry from the endpoint definitions in scenario config.
Falls back to a default LLM endpoint derived from env vars / flat
config fields if no [config.endpoints] are defined.
Sourcepub fn get(&self, name: &str) -> Option<&ResolvedEndpoint>
pub fn get(&self, name: &str) -> Option<&ResolvedEndpoint>
Resolves an endpoint by explicit name.
Returns None if no endpoint with the given name exists.
Sourcepub fn resolve_for_task(&self, task: TaskType) -> &ResolvedEndpoint
pub fn resolve_for_task(&self, task: TaskType) -> &ResolvedEndpoint
Resolves the best endpoint for a given task type.
Checks for a default_for mapping first, then falls back to any LLM
endpoint, then panics (config error).
Trait Implementations§
Source§impl Clone for EndpointRegistry
impl Clone for EndpointRegistry
Source§fn clone(&self) -> EndpointRegistry
fn clone(&self) -> EndpointRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EndpointRegistry
impl RefUnwindSafe for EndpointRegistry
impl Send for EndpointRegistry
impl Sync for EndpointRegistry
impl Unpin for EndpointRegistry
impl UnsafeUnpin for EndpointRegistry
impl UnwindSafe for EndpointRegistry
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