pub struct ConfigLock { /* private fields */ }
Expand description
A guard that holds the global configuration lock and provides override functionality.
This struct acts as both a lock guard (preventing other tests from modifying global config) and as the only way to create configuration overrides. Override guards cannot outlive this ConfigLock, ensuring proper synchronization.
Implementations§
Source§impl ConfigLock
impl ConfigLock
Sourcepub fn override_key<'a, T: Send + Sync + Serialize + DeserializeOwned + Named + Clone + 'static>(
&'a self,
key: Key<T>,
value: T,
) -> ConfigValueGuard<'a, T>
pub fn override_key<'a, T: Send + Sync + Serialize + DeserializeOwned + Named + Clone + 'static>( &'a self, key: Key<T>, value: T, ) -> ConfigValueGuard<'a, T>
Create a configuration override that will be restored when the guard is dropped.
The returned guard must not outlive this ConfigLock.
Auto Trait Implementations§
impl Freeze for ConfigLock
impl RefUnwindSafe for ConfigLock
impl !Send for ConfigLock
impl Sync for ConfigLock
impl Unpin for ConfigLock
impl UnwindSafe for ConfigLock
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§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