pub struct LocaleTestGuard { /* private fields */ }Expand description
RAII guard returned by test_lock(). Holds the serialisation
mutex AND restores the locale that was current at lock-acquire
time. Field declaration order matters: original (with its
Drop impl below) drops before _guard, so the locale is
restored while the lock is still held — the next waiter never
sees a transient mixed state.
Trait Implementations§
Source§impl Drop for LocaleTestGuard
impl Drop for LocaleTestGuard
Auto Trait Implementations§
impl Freeze for LocaleTestGuard
impl RefUnwindSafe for LocaleTestGuard
impl !Send for LocaleTestGuard
impl Sync for LocaleTestGuard
impl Unpin for LocaleTestGuard
impl UnsafeUnpin for LocaleTestGuard
impl UnwindSafe for LocaleTestGuard
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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