pub struct ConfigDefinition {
pub key: &'static str,
pub label_i18n_key: &'static str,
pub description_i18n_key: &'static str,
pub value_type: ConfigValueType,
pub default_fn: fn() -> String,
pub normalize_fn: Option<ConfigNormalizer>,
pub dependency_validator_fn: Option<ConfigDependencyValidator>,
pub requires_restart: bool,
pub is_sensitive: bool,
pub visibility: ConfigVisibility,
pub category: &'static str,
pub description: &'static str,
}Expand description
Product-owned metadata for one configuration key.
Fields§
§key: &'static strStable storage key.
label_i18n_key: &'static strFrontend i18n key for the display label.
description_i18n_key: &'static strFrontend i18n key for the description.
value_type: ConfigValueTypeStorage and API value kind.
default_fn: fn() -> StringFunction returning the default storage value.
normalize_fn: Option<ConfigNormalizer>Optional product-owned value normalizer.
dependency_validator_fn: Option<ConfigDependencyValidator>Optional product-owned cross-field validator.
requires_restart: boolWhether changes require process restart before they can take effect.
is_sensitive: boolWhether values should be redacted in presentation and audit output.
visibility: ConfigVisibilityDefault consumer visibility for this system-defined value.
category: &'static strProduct-defined category key.
description: &'static strBackend-facing description used when initializing storage rows.
Implementations§
Source§impl ConfigDefinition
impl ConfigDefinition
Sourcepub const fn private_system() -> Self
pub const fn private_system() -> Self
Returns a baseline private system definition for struct update syntax.
Product registries usually repeat the same neutral metadata for most entries: system-owned source, private visibility, no normalizer, and no dependency validator. This helper keeps static definition lists compact while still requiring each product to spell out the storage key, type, default, category, and descriptions that define its public contract.
Trait Implementations§
Source§impl Clone for ConfigDefinition
impl Clone for ConfigDefinition
Source§fn clone(&self) -> ConfigDefinition
fn clone(&self) -> ConfigDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConfigDefinition
impl Debug for ConfigDefinition
impl Copy for ConfigDefinition
Auto Trait Implementations§
impl Freeze for ConfigDefinition
impl RefUnwindSafe for ConfigDefinition
impl Send for ConfigDefinition
impl Sync for ConfigDefinition
impl Unpin for ConfigDefinition
impl UnsafeUnpin for ConfigDefinition
impl UnwindSafe for ConfigDefinition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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