pub trait SignIn:
WasmCompatSend
+ WasmCompatSync
+ 'static {
// Required methods
fn handler(
&self,
spec: &ModelSpec,
transport: &Transport,
) -> Option<Result<ErasedHandler, ConnectError>>;
fn plan(&self, spec: &ModelSpec) -> Option<&'static str>;
}Expand description
A way to reach catalog models no key is set for, such as a
subscription plan signed in to. A Connector asks it for a model only
when the provider registered for the model’s vendor, else the
environment, has no key for it.
Required Methods§
Sourcefn handler(
&self,
spec: &ModelSpec,
transport: &Transport,
) -> Option<Result<ErasedHandler, ConnectError>>
fn handler( &self, spec: &ModelSpec, transport: &Transport, ) -> Option<Result<ErasedHandler, ConnectError>>
The handler serving spec with the signed-in credential, or None
when this sign-in does not serve spec now. A handler that sends
HTTP sends through transport.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".