Skip to content

Commit

Permalink
define Serialize for RegionConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
paritosh-08 committed Oct 4, 2023
1 parent 1ee69d9 commit 59c9886
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rust-connector-sdk/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,15 @@ pub trait Connector {
) -> Result<models::QueryResponse, QueryError>;
}

#[derive(Serialize)]
pub enum ConnectorMode {
ReadOnly,
ReadWrite,
WriteOnly,
}

#[derive(Serialize)]
#[serde(bound = "<C as Connector>::Configuration: Serialize")]
pub struct RegionConfiguration<C: Connector + ?Sized> {
pub config: <C as Connector>::Configuration,
pub mode: ConnectorMode,
Expand Down

0 comments on commit 59c9886

Please sign in to comment.