Skip to main content

ProviderVerifier

Trait ProviderVerifier 

Source
pub trait ProviderVerifier {
    // Required method
    fn verify(
        &self,
        creds: &ProviderCreds,
    ) -> impl Future<Output = Outcome> + Send;
}
Expand description

Checks whether a set of provider credentials actually works.

The whole point is that the wizard never calls a provider directly, so its tests never open a socket.

Required Methods§

Source

fn verify(&self, creds: &ProviderCreds) -> impl Future<Output = Outcome> + Send

Ask the provider whether these credentials work, and what models they reach. Never fails: an unreachable provider is an Outcome::Failed, not an error, because the wizard reports it rather than stopping.

Returns impl Future rather than being an async fn so the Send bound is part of the contract. An async fn in a trait leaves it unstated, which is fine while every caller is concrete and becomes a silent constraint the moment one is not.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§