Skip to main content

ConfigEntryOptionsBuilder

Struct ConfigEntryOptionsBuilder 

Source
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

Source

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.

Source

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.

Source

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 or None
§Returns

This builder.

Source

pub fn set_source(self, source: ConfigSource) -> Self

Sets source.

§Arguments
  • source - the source of this config entry
§Returns

This builder.

Source

pub fn set_is_sensitive(self, is_sensitive: bool) -> Self

Sets is_sensitive.

§Arguments
  • is_sensitive - whether the config value is sensitive, the broker never returns the value if it is sensitive
§Returns

This builder.

Source

pub fn set_is_read_only(self, is_read_only: bool) -> Self

Sets is_read_only.

§Arguments
  • is_read_only - whether the config is read-only and cannot be updated
§Returns

This builder.

Source

pub fn set_synonyms(self, synonyms: Vec<ConfigSynonym>) -> Self

Sets synonyms.

§Arguments
  • synonyms - synonym configs in order of precedence
§Returns

This builder.

Source

pub fn set_config_type(self, config_type: Option<ConfigType>) -> Self

Sets config_type.

§Arguments
  • config_type - the config data type, or None for Java’s null, which the createTopics entries carry
§Returns

This builder.

Source

pub fn set_documentation(self, documentation: Option<String>) -> Self

Sets documentation.

§Arguments
  • documentation - the config documentation
§Returns

This builder.

Source

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_error if name or value was not set, naming the first one missing.

Trait Implementations§

Source§

impl Debug for ConfigEntryOptionsBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ConfigEntryOptionsBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V