pub trait GetMut {
type Inner;
// Required method
fn get_by_mut(&mut self) -> Self::Inner;
}Expand description
A trait for getting the inner value of an atomic type when we hold a mutable reference.
We could just use get_mut directly, but loom’s atomic types do not implement get_mut.
Instead, we just get it atomically, since performance doesn’t matter so much in tests.
Required Associated Types§
Required Methods§
Sourcefn get_by_mut(&mut self) -> Self::Inner
fn get_by_mut(&mut self) -> Self::Inner
Use the fact that we have a mutable reference to load the value non-atomically.