pub struct ConfigEntryOptionsBuilder { /* private fields */ }Expand description
Fluent builder for ConfigEntryOptions.
Self::new takes no parameters, every parameter has a fluent setter, and
Self::build returns an error if a mandatory one (name, value) was not
set.
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 name, a mandatory parameter: Self::build returns an error if it
was not set.
§Arguments
name- the non-None config name
§Returns
This builder.
Sourcepub fn set_value(self, value: Option<String>) -> Self
pub fn set_value(self, value: Option<String>) -> Self
Sets value, a mandatory parameter: Self::build returns an error if it
was not set.
§Arguments
value- the config value orNone
§Returns
This builder.
Sourcepub fn set_source(self, source: ConfigSource) -> Self
pub fn set_source(self, source: ConfigSource) -> Self
Sourcepub fn set_is_sensitive(self, is_sensitive: bool) -> Self
pub fn set_is_sensitive(self, is_sensitive: bool) -> Self
Sourcepub fn set_is_read_only(self, is_read_only: bool) -> Self
pub fn set_is_read_only(self, is_read_only: bool) -> Self
Sourcepub fn set_synonyms(self, synonyms: Vec<ConfigSynonym>) -> Self
pub fn set_synonyms(self, synonyms: Vec<ConfigSynonym>) -> Self
Sourcepub fn set_config_type(self, config_type: Option<ConfigType>) -> Self
pub fn set_config_type(self, config_type: Option<ConfigType>) -> Self
Sourcepub fn set_documentation(self, documentation: Option<String>) -> Self
pub fn set_documentation(self, documentation: Option<String>) -> Self
Sourcepub fn build(self) -> Result<ConfigEntryOptions, Error>
pub fn build(self) -> Result<ConfigEntryOptions, Error>
Returns the built options.
Only the presence of the mandatory parameters is checked here; semantic
validation belongs to ConfigEntry::with_options.
§Errors
Error::is_local_illegal_argument_errorifnameorvaluewas not set, naming the first one missing.
Trait Implementations§
Source§impl Debug for ConfigEntryOptionsBuilder
impl Debug for ConfigEntryOptionsBuilder
Auto Trait Implementations§
impl Freeze for ConfigEntryOptionsBuilder
impl RefUnwindSafe for ConfigEntryOptionsBuilder
impl Send for ConfigEntryOptionsBuilder
impl Sync for ConfigEntryOptionsBuilder
impl Unpin for ConfigEntryOptionsBuilder
impl UnsafeUnpin for ConfigEntryOptionsBuilder
impl UnwindSafe for ConfigEntryOptionsBuilder
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