wp_connector_api/config/adapter.rs
1use crate::types::ParamMap;
2
3/// Adapter trait for parsing connector URL into flattened params and providing defaults.
4///
5/// Note: The global registry and lifecycle management of adapters live in wp-engine.
6/// This API crate only defines the trait and common ParamMap type to keep the interface stable.
7pub trait ConnectorKindAdapter: Send + Sync {
8 fn kind(&self) -> &'static str;
9 fn defaults(&self) -> ParamMap {
10 ParamMap::new()
11 }
12 fn url_to_params(&self, _url: &str) -> anyhow::Result<ParamMap> {
13 Ok(ParamMap::new())
14 }
15}