RestAuth

Trait RestAuth 

Source
pub trait RestAuth: AuthProvider {
    // Required method
    fn rest_url(
        &self,
        endpoint: ServiceEndpoint,
        model: Option<&GeminiModel>,
    ) -> String;
}
Expand description

Auth providers that additionally support REST endpoint URL construction.

Split from AuthProvider so that Live-only providers are not forced to implement REST URL building, and so the REST Client can require it at the type level — replacing the previous runtime unimplemented!() default with a compile-time guarantee.

Required Methods§

Source

fn rest_url( &self, endpoint: ServiceEndpoint, model: Option<&GeminiModel>, ) -> String

Build a REST API URL for the given service endpoint and model.

Implementors§