pub struct CombinedMeasurementsConfig<'a> { /* private fields */ }
Expand description
Container for global and project level MeasurementsConfig
. The purpose is to handle
the merging logic.
Implementations§
Source§impl<'a> CombinedMeasurementsConfig<'a>
impl<'a> CombinedMeasurementsConfig<'a>
Sourcepub fn new(
project: Option<&'a MeasurementsConfig>,
global: Option<&'a MeasurementsConfig>,
) -> Self
pub fn new( project: Option<&'a MeasurementsConfig>, global: Option<&'a MeasurementsConfig>, ) -> Self
Constructor for CombinedMeasurementsConfig
.
Sourcepub fn builtin_measurement_keys(
&'a self,
) -> impl Iterator<Item = &'a BuiltinMeasurementKey> + 'a
pub fn builtin_measurement_keys( &'a self, ) -> impl Iterator<Item = &'a BuiltinMeasurementKey> + 'a
Returns an iterator over the merged builtin measurement keys.
Items from the project config are prioritized over global config, and there are no duplicates.
Sourcepub fn max_custom_measurements(&'a self) -> Option<usize>
pub fn max_custom_measurements(&'a self) -> Option<usize>
Gets the max custom measurements value from the MeasurementsConfig
from project level or
global level. If both of them are available, it will choose the most restrictive.
Trait Implementations§
Source§impl<'a> Clone for CombinedMeasurementsConfig<'a>
impl<'a> Clone for CombinedMeasurementsConfig<'a>
Source§fn clone(&self) -> CombinedMeasurementsConfig<'a>
fn clone(&self) -> CombinedMeasurementsConfig<'a>
Returns a copy 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 moreAuto Trait Implementations§
impl<'a> Freeze for CombinedMeasurementsConfig<'a>
impl<'a> RefUnwindSafe for CombinedMeasurementsConfig<'a>
impl<'a> Send for CombinedMeasurementsConfig<'a>
impl<'a> Sync for CombinedMeasurementsConfig<'a>
impl<'a> Unpin for CombinedMeasurementsConfig<'a>
impl<'a> UnwindSafe for CombinedMeasurementsConfig<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more