Struct DelegateTargetConfig
pub struct DelegateTargetConfig {
pub agent: String,
pub mode: DelegateExecutionMode,
}Expand description
One explicit delegate target listed under [agents.<alias>].delegates.
String entries deserialize as { agent = "<string>", mode = "bounded" }
for concise manual editing. Serialization always emits the object form so
the config surface is a pure object array.
Fields§
§agent: StringTarget agent alias.
mode: DelegateExecutionModeWhether this target is parent-bounded or independent.
Implementations§
Source§impl DelegateTargetConfig
impl DelegateTargetConfig
Sourcepub fn configurable_prefix() -> &'static str
pub fn configurable_prefix() -> &'static str
Returns the #[prefix] value for this Configurable struct.
Sourcepub fn secret_fields(&self) -> Vec<SecretFieldInfo>
pub fn secret_fields(&self) -> Vec<SecretFieldInfo>
Returns metadata about all #[secret] fields on this struct and nested children.
pub fn secret_field_terminals() -> Vec<&'static str>
Sourcepub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
pub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
Encrypt all secret fields in place using the provided store.
Sourcepub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
pub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
Decrypt all secret fields in place using the provided store.
Sourcepub fn set_secret(&mut self, name: &str, value: String) -> Result<(), Error>
pub fn set_secret(&mut self, name: &str, value: String) -> Result<(), Error>
Set a secret field by its full dotted name, dispatching to nested children.
Sourcepub fn prop_fields(&self) -> Vec<PropFieldInfo>
pub fn prop_fields(&self) -> Vec<PropFieldInfo>
Returns metadata about all property fields on this struct and nested children.
Sourcepub fn get_prop(&self, name: &str) -> Result<String, Error>
pub fn get_prop(&self, name: &str) -> Result<String, Error>
Get a property value by its full dotted name, returning it as a display string.
Sourcepub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<(), Error>
pub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<(), Error>
Set a property value by its full dotted name, parsing from string.
Sourcepub fn prop_is_secret(name: &str) -> bool
pub fn prop_is_secret(name: &str) -> bool
Check if a property name refers to a secret field (static, no instance needed).
Sourcepub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
pub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
Instantiate None nested sections whose prefix matches.
Returns the prefixes that were initialized.
Sourcepub fn map_key_sections() -> Vec<MapKeySection>
pub fn map_key_sections() -> Vec<MapKeySection>
Enumerate every map-keyed (HashMap<String, T>) and list-shaped
(Vec<T>) section discoverable from this Configurable’s tree.
The dashboard / CLI consume this to surface “+ Add” affordances
without hardcoding the section list.
Sourcepub fn nested_section_help(name: &str) -> Option<&'static str>
pub fn nested_section_help(name: &str) -> Option<&'static str>
Help blurb for a #[nested] field on this struct, sourced from
the field-level /// docstring. Returns None for unknown
names so callers can fall through to a different lookup.
pub fn nested_section_group(name: &str) -> Option<&'static str>
Sourcepub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
pub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
Return the current alias keys at section_path, or None if
the path doesn’t resolve to a map-keyed section in this tree.
pub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>
pub fn create_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
pub fn delete_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
pub fn rename_map_key( &mut self, section_path: &str, map_key: &str, new_key: &str, ) -> Result<bool, String>
Source§impl DelegateTargetConfig
impl DelegateTargetConfig
Sourcepub fn bounded(agent: impl Into<String>) -> DelegateTargetConfig
pub fn bounded(agent: impl Into<String>) -> DelegateTargetConfig
Construct the legacy-equivalent target shape used for string entries.
Most tests and migration paths call this instead of spelling out
mode = Bounded, making it explicit that a bare delegate alias never
opts into independent execution.
Sourcepub fn agent(&self) -> &str
pub fn agent(&self) -> &str
Return the raw configured alias.
Callers that compare aliases should trim at the comparison boundary so diagnostics can still point at the stored value when validation fails.
Sourcepub fn mode(&self) -> DelegateExecutionMode
pub fn mode(&self) -> DelegateExecutionMode
Return the configured execution mode for this explicit target.
Trait Implementations§
Source§impl Clone for DelegateTargetConfig
impl Clone for DelegateTargetConfig
Source§fn clone(&self) -> DelegateTargetConfig
fn clone(&self) -> DelegateTargetConfig
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DelegateTargetConfig
impl Debug for DelegateTargetConfig
Source§impl Default for DelegateTargetConfig
impl Default for DelegateTargetConfig
Source§fn default() -> DelegateTargetConfig
fn default() -> DelegateTargetConfig
Source§impl<'de> Deserialize<'de> for DelegateTargetConfig
impl<'de> Deserialize<'de> for DelegateTargetConfig
Source§fn deserialize<D>(
deserializer: D,
) -> Result<DelegateTargetConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<DelegateTargetConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl JsonSchema for DelegateTargetConfig
impl JsonSchema for DelegateTargetConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl MaskSecrets for DelegateTargetConfig
impl MaskSecrets for DelegateTargetConfig
fn mask_secrets(&mut self)
fn restore_secrets_from(&mut self, current: &DelegateTargetConfig)
Source§impl PartialEq for DelegateTargetConfig
impl PartialEq for DelegateTargetConfig
Source§fn eq(&self, other: &DelegateTargetConfig) -> bool
fn eq(&self, other: &DelegateTargetConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for DelegateTargetConfig
impl Serialize for DelegateTargetConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for DelegateTargetConfig
impl StructuralPartialEq for DelegateTargetConfig
Auto Trait Implementations§
impl Freeze for DelegateTargetConfig
impl RefUnwindSafe for DelegateTargetConfig
impl Send for DelegateTargetConfig
impl Sync for DelegateTargetConfig
impl Unpin for DelegateTargetConfig
impl UnsafeUnpin for DelegateTargetConfig
impl UnwindSafe for DelegateTargetConfig
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more