pub struct ConfigCodegen {
pub init_snippet: String,
pub load_snippet: String,
pub client_from_config: String,
pub config_var_name: String,
pub loaded_config_var_name: String,
}Expand description
Configuration code generation patterns for a provider
Fields§
§init_snippet: StringCode to initialize the config loader/builder Example (AWS): “aws_config::from_env()” Example (GCP): “ClientConfig::default()”
load_snippet: StringCode to finalize and load the config Example (AWS): “config_loader.load().await” Example (K8s): “Config::from_kubeconfig(&kubeconfig_data).await”
client_from_config: StringCode to create client from config Uses {config} placeholder for the loaded config variable Example (AWS): “{client_type}::new(&{config})” Example (K8s): “Client::try_from({config})”
config_var_name: StringVariable name for the config loader/builder Example: “config_loader” or “config_builder”
loaded_config_var_name: StringVariable name for the loaded config Example: “sdk_config” or “config”
Trait Implementations§
Source§impl Clone for ConfigCodegen
impl Clone for ConfigCodegen
Source§fn clone(&self) -> ConfigCodegen
fn clone(&self) -> ConfigCodegen
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigCodegen
impl Debug for ConfigCodegen
Source§impl<'de> Deserialize<'de> for ConfigCodegen
impl<'de> Deserialize<'de> for ConfigCodegen
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConfigCodegen
impl RefUnwindSafe for ConfigCodegen
impl Send for ConfigCodegen
impl Sync for ConfigCodegen
impl Unpin for ConfigCodegen
impl UnwindSafe for ConfigCodegen
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more