From 13a358fc0f9d128b8900ca8aceaca5c8a16209d3 Mon Sep 17 00:00:00 2001 From: Paritosh Date: Thu, 5 Oct 2023 13:11:22 +0530 Subject: [PATCH] make the `make_region_configuration_map` async --- rust-connector-sdk/src/connector.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/rust-connector-sdk/src/connector.rs b/rust-connector-sdk/src/connector.rs index 978dac16..87ad656e 100644 --- a/rust-connector-sdk/src/connector.rs +++ b/rust-connector-sdk/src/connector.rs @@ -190,11 +190,11 @@ pub trait Connector { type State; /// Creates the region configuration map - fn make_region_configuration_map( + async fn make_region_configuration_map( _raw_config: &Self::RawConfiguration, - ) -> HashMap> { + ) -> Result>, ValidateError> { // Defaults to an empty map - HashMap::new() + Ok(HashMap::new()) } fn make_empty_configuration() -> Self::RawConfiguration; @@ -295,10 +295,8 @@ pub enum ConnectorMode { } #[derive(Serialize, Deserialize)] -#[serde( - bound = "::Configuration: Serialize, ::Configuration: DeserializeOwned" -)] +#[serde(bound = "C::Configuration: Serialize, C::Configuration: DeserializeOwned")] pub struct RegionConfiguration { - pub config: ::Configuration, + pub config: C::Configuration, pub mode: ConnectorMode, }