pub struct DynamicMap(pub HashMap<String, Value>);Expand description
Generic dynamic key-value map with nested structure support.
Used for flexible executor bindings that vary by deployment context (e.g., Kubernetes, cloud provider, SPIFFE federation).
Tuple Fields§
§0: HashMap<String, Value>Implementations§
Source§impl DynamicMap
impl DynamicMap
pub fn new() -> Self
Sourcepub fn with_map(self, key: &str, value: DynamicMap) -> Self
pub fn with_map(self, key: &str, value: DynamicMap) -> Self
Adds a nested map.
Sourcepub fn with_value(self, key: &str, value: Value) -> Self
pub fn with_value(self, key: &str, value: Value) -> Self
Adds an arbitrary JSON value.
Sourcepub fn with_array(self, key: &str, values: Vec<&str>) -> Self
pub fn with_array(self, key: &str, values: Vec<&str>) -> Self
Adds a string array.
pub fn get(&self, key: &str) -> Option<&Value>
pub fn get_str(&self, key: &str) -> Option<&str>
pub fn get_map(&self, key: &str) -> Option<DynamicMap>
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for DynamicMap
impl Clone for DynamicMap
Source§fn clone(&self) -> DynamicMap
fn clone(&self) -> DynamicMap
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 DynamicMap
impl Debug for DynamicMap
Source§impl Default for DynamicMap
impl Default for DynamicMap
Source§fn default() -> DynamicMap
fn default() -> DynamicMap
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DynamicMap
impl<'de> Deserialize<'de> for DynamicMap
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
Source§impl PartialEq for DynamicMap
impl PartialEq for DynamicMap
Source§impl Serialize for DynamicMap
impl Serialize for DynamicMap
impl StructuralPartialEq for DynamicMap
Auto Trait Implementations§
impl Freeze for DynamicMap
impl RefUnwindSafe for DynamicMap
impl Send for DynamicMap
impl Sync for DynamicMap
impl Unpin for DynamicMap
impl UnwindSafe for DynamicMap
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