Skip to main content

EndpointExt

Trait EndpointExt 

Source
pub trait EndpointExt {
    // Required methods
    fn resolve_endpoint(&self, name: &str) -> Result<&EndpointConfig>;
    fn call_service(
        &self,
        service_name: &str,
    ) -> impl Future<Output = Result<Value>> + Send;
    fn list_remote_models(
        &self,
    ) -> impl Future<Output = Result<Vec<String>>> + Send;
}

Required Methods§

Source

fn resolve_endpoint(&self, name: &str) -> Result<&EndpointConfig>

Source

fn call_service( &self, service_name: &str, ) -> impl Future<Output = Result<Value>> + Send

Call a generic service by name. The returned future is Send and safe to use across threads.

Source

fn list_remote_models(&self) -> impl Future<Output = Result<Vec<String>>> + Send

List models available from the provider. The returned future is Send and safe to use across threads.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§