pub struct ConfigurationBuilder { /* private fields */ }Expand description
Builds a resolved Configuration.
Implementations§
Source§impl ConfigurationBuilder
impl ConfigurationBuilder
Sourcepub fn default_dataset_id(self, value: impl Into<String>) -> Self
pub fn default_dataset_id(self, value: impl Into<String>) -> Self
Sets the default dataset identifier.
Sourcepub fn default_key_value_store_id(self, value: impl Into<String>) -> Self
pub fn default_key_value_store_id(self, value: impl Into<String>) -> Self
Sets the default key-value store identifier.
Sourcepub fn default_request_queue_id(self, value: impl Into<String>) -> Self
pub fn default_request_queue_id(self, value: impl Into<String>) -> Self
Sets the default request queue identifier.
Sourcepub fn storage_dir(self, value: impl Into<PathBuf>) -> Self
pub fn storage_dir(self, value: impl Into<PathBuf>) -> Self
Sets the storage directory.
Sourcepub fn max_used_cpu_ratio(self, value: f32) -> Self
pub fn max_used_cpu_ratio(self, value: f32) -> Self
Sets the maximum used CPU ratio.
Sourcepub fn available_memory_ratio(self, value: f32) -> Self
pub fn available_memory_ratio(self, value: f32) -> Self
Sets the available memory ratio.
Sourcepub fn memory_bytes(self, value: u64) -> Self
pub fn memory_bytes(self, value: u64) -> Self
Sets the memory limit in bytes.
Sourcepub fn persist_state_interval(self, value: Duration) -> Self
pub fn persist_state_interval(self, value: Duration) -> Self
Sets the interval between state persistence events.
Sourcepub fn purge_on_start(self, value: bool) -> Self
pub fn purge_on_start(self, value: bool) -> Self
Sets whether storage is purged at startup.
Sourcepub fn storage_client(self, value: Arc<dyn StorageClient>) -> Self
pub fn storage_client(self, value: Arc<dyn StorageClient>) -> Self
Sets the storage backend client.
Sourcepub fn build(self) -> Result<Configuration, ConfigError>
pub fn build(self) -> Result<Configuration, ConfigError>
Resolves this builder using process environment overrides.
Trait Implementations§
Source§impl Clone for ConfigurationBuilder
impl Clone for ConfigurationBuilder
Source§fn clone(&self) -> ConfigurationBuilder
fn clone(&self) -> ConfigurationBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigurationBuilder
impl Debug for ConfigurationBuilder
Source§impl Default for ConfigurationBuilder
impl Default for ConfigurationBuilder
Source§fn default() -> ConfigurationBuilder
fn default() -> ConfigurationBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ConfigurationBuilder
impl !UnwindSafe for ConfigurationBuilder
impl Freeze for ConfigurationBuilder
impl Send for ConfigurationBuilder
impl Sync for ConfigurationBuilder
impl Unpin for ConfigurationBuilder
impl UnsafeUnpin for ConfigurationBuilder
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