pub struct ConfigEntryOptionsBuilder { /* private fields */ }Expand description
Fluent builder for ConfigEntryOptions.
Per CLAUDE.md §2 Self::new takes no parameters, every parameter has a
fluent setter, and Self::build validates the mandatory ones — returning
Error::LocalIllegalArgument if they were not set. Like ConfigEntryOptions it has no Java counterpart and
exists solely to satisfy that naming rule (DoD #7).
Implementations§
Source§impl ConfigEntryOptionsBuilder
impl ConfigEntryOptionsBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a builder with every mandatory parameter unset and every other parameter at the value Java passes on the caller’s behalf.
Sourcepub fn set_name(self, name: String) -> Self
pub fn set_name(self, name: String) -> Self
Sets ConfigEntryOptions::name, a mandatory parameter: Self::build
panics if it was not set.
Sourcepub fn set_value(self, value: Option<String>) -> Self
pub fn set_value(self, value: Option<String>) -> Self
Sets ConfigEntryOptions::value, a mandatory parameter: Self::build
panics if it was not set.
Sourcepub fn set_source(self, source: ConfigSource) -> Self
pub fn set_source(self, source: ConfigSource) -> Self
Sets ConfigEntryOptions::source.
Sourcepub fn set_is_sensitive(self, is_sensitive: bool) -> Self
pub fn set_is_sensitive(self, is_sensitive: bool) -> Self
Sets ConfigEntryOptions::is_sensitive.
Sourcepub fn set_is_read_only(self, is_read_only: bool) -> Self
pub fn set_is_read_only(self, is_read_only: bool) -> Self
Sets ConfigEntryOptions::is_read_only.
Sourcepub fn set_synonyms(self, synonyms: Vec<ConfigSynonym>) -> Self
pub fn set_synonyms(self, synonyms: Vec<ConfigSynonym>) -> Self
Sets ConfigEntryOptions::synonyms.
Sourcepub fn set_config_type(self, config_type: ConfigType) -> Self
pub fn set_config_type(self, config_type: ConfigType) -> Self
Sets ConfigEntryOptions::config_type.
Sourcepub fn set_documentation(self, documentation: Option<String>) -> Self
pub fn set_documentation(self, documentation: Option<String>) -> Self
Sets ConfigEntryOptions::documentation.
Sourcepub fn build(self) -> Result<ConfigEntryOptions, Error>
pub fn build(self) -> Result<ConfigEntryOptions, Error>
Returns the built options.
Per CLAUDE.md §2 the mandatory parameters are validated here rather than
being named in the constructor, so a later Java version that makes one of
them optional changes the set this accepts instead of adding a second
constructor. Today there is one mandatory set: name, value.
§Errors
Returns Error::LocalIllegalArgument naming the first parameter of that
set which was not given a setter call. Only presence is checked here;
semantic validation belongs to the method the options are passed to
(CLAUDE.md §2).