pub struct Swapper<T> {
pub(crate) contents: Arc<AtomicPtr<T>>,
pub(crate) wait: Receiver<()>,
pub(crate) notify: Sender<()>,
}
Expand description
A concurrency control for swapping ownership between threads.
Fields§
§contents: Arc<AtomicPtr<T>>
§wait: Receiver<()>
§notify: Sender<()>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Swapper<T>
impl<T> RefUnwindSafe for Swapper<T>
impl<T> !Sync for Swapper<T>
impl<T> Unpin for Swapper<T>
impl<T> UnwindSafe for Swapper<T>
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