pub struct ReviverConfig {
pub secrets_map: HashMap<String, String>,
pub valid_namespaces: Vec<String>,
pub secrets_from_env: bool,
pub additional_import_mappings: HashMap<Vec<String>, Vec<String>>,
pub ignore_unserializable_fields: bool,
}Expand description
Configuration for the Reviver.
Fields§
§secrets_map: HashMap<String, String>A map of secrets to load. If a secret is not found in the map,
it will be loaded from the environment if secrets_from_env is true.
valid_namespaces: Vec<String>A list of additional namespaces (modules) to allow to be deserialized.
secrets_from_env: boolWhether to load secrets from the environment.
additional_import_mappings: HashMap<Vec<String>, Vec<String>>Additional import mappings to override or extend the default mappings.
ignore_unserializable_fields: boolWhether to ignore unserializable fields (return None instead of error).
Implementations§
Source§impl ReviverConfig
impl ReviverConfig
Sourcepub fn with_secrets_map(self, secrets_map: HashMap<String, String>) -> Self
pub fn with_secrets_map(self, secrets_map: HashMap<String, String>) -> Self
Set the secrets map.
Sourcepub fn with_valid_namespaces(self, namespaces: Vec<String>) -> Self
pub fn with_valid_namespaces(self, namespaces: Vec<String>) -> Self
Add additional valid namespaces.
Sourcepub fn with_secrets_from_env(self, secrets_from_env: bool) -> Self
pub fn with_secrets_from_env(self, secrets_from_env: bool) -> Self
Set whether to load secrets from the environment.
Sourcepub fn with_additional_import_mappings(
self,
mappings: HashMap<Vec<String>, Vec<String>>,
) -> Self
pub fn with_additional_import_mappings( self, mappings: HashMap<Vec<String>, Vec<String>>, ) -> Self
Add additional import mappings.
Sourcepub fn with_ignore_unserializable_fields(self, ignore: bool) -> Self
pub fn with_ignore_unserializable_fields(self, ignore: bool) -> Self
Set whether to ignore unserializable fields.
Trait Implementations§
Source§impl Clone for ReviverConfig
impl Clone for ReviverConfig
Source§fn clone(&self) -> ReviverConfig
fn clone(&self) -> ReviverConfig
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 ReviverConfig
impl Debug for ReviverConfig
Auto Trait Implementations§
impl Freeze for ReviverConfig
impl RefUnwindSafe for ReviverConfig
impl Send for ReviverConfig
impl Sync for ReviverConfig
impl Unpin for ReviverConfig
impl UnwindSafe for ReviverConfig
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