rig/client/verify.rs
1use crate::{http_client, wasm_compat::WasmCompatSend};
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum VerifyError {
6 #[error("invalid authentication")]
7 InvalidAuthentication,
8 #[error("provider error: {0}")]
9 ProviderError(String),
10 #[error("http error: {0}")]
11 HttpError(
12 #[from]
13 #[source]
14 http_client::Error,
15 ),
16}
17
18/// A provider client that can verify the configuration.
19/// Clone is required for conversions between client types.
20pub trait VerifyClient {
21 /// Verify the configuration.
22 fn verify(&self) -> impl Future<Output = Result<(), VerifyError>> + WasmCompatSend;
23}