pub enum ConfigValue<T> {
Default,
Extend(T),
Overwrite(T),
}
Expand description
A generic configuration value wrapper that supports different merging strategies.
This enum is used to represent configuration fields that may either use default values, extend existing ones, or completely overwrite them. It provides a flexible mechanism for combining configurations from multiple sources.
Variants§
Default
Uses the default behavior or value.
Extend(T)
Appends or merges the provided value with existing data.
Overwrite(T)
Replaces any existing data with the provided value.
Trait Implementations§
Source§impl<T: Debug> Debug for ConfigValue<T>
impl<T: Debug> Debug for ConfigValue<T>
Source§impl<T> Default for ConfigValue<T>
impl<T> Default for ConfigValue<T>
Source§fn default() -> ConfigValue<T>
fn default() -> ConfigValue<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for ConfigValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for ConfigValue<T>where
T: RefUnwindSafe,
impl<T> Send for ConfigValue<T>where
T: Send,
impl<T> Sync for ConfigValue<T>where
T: Sync,
impl<T> Unpin for ConfigValue<T>where
T: Unpin,
impl<T> UnwindSafe for ConfigValue<T>where
T: UnwindSafe,
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