pub struct ValueTrace {
pub final_value: TracedValue,
pub history: Vec<TracedValue>,
}Expand description
Trace of a single configuration value.
Fields§
§final_value: TracedValueThe final value (from highest priority source)
history: Vec<TracedValue>All values from all sources, in priority order (lowest first)
Implementations§
Source§impl ValueTrace
impl ValueTrace
Sourcepub fn new(history: Vec<TracedValue>) -> Option<Self>
pub fn new(history: Vec<TracedValue>) -> Option<Self>
Create a new value trace from a history of traced values.
The last value in the history is considered the final value.
The is_final flag is automatically set on the last value.
Sourcepub fn was_overridden(&self) -> bool
pub fn was_overridden(&self) -> bool
Check if this value was overridden (has more than one source).
Sourcepub fn source_count(&self) -> usize
pub fn source_count(&self) -> usize
Get the number of sources that provided this value.
Trait Implementations§
Source§impl Clone for ValueTrace
impl Clone for ValueTrace
Source§fn clone(&self) -> ValueTrace
fn clone(&self) -> ValueTrace
Returns a duplicate of the value. Read more
1.0.0 · 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 ValueTrace
impl Debug for ValueTrace
Auto Trait Implementations§
impl Freeze for ValueTrace
impl RefUnwindSafe for ValueTrace
impl Send for ValueTrace
impl Sync for ValueTrace
impl Unpin for ValueTrace
impl UnwindSafe for ValueTrace
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