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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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