Struct parity_send_wrapper::SendWrapper
source · pub struct SendWrapper<T> { /* private fields */ }
Expand description
A wrapper which allows you to move around non-Send
-types between threads, as long as you access the contained
value only from within the original thread and make sure that it is dropped from within the original thread.
Implementations§
source§impl<T> SendWrapper<T>
impl<T> SendWrapper<T>
Trait Implementations§
source§impl<T> Deref for SendWrapper<T>
impl<T> Deref for SendWrapper<T>
source§impl<T> DerefMut for SendWrapper<T>
impl<T> DerefMut for SendWrapper<T>
source§impl<T> Drop for SendWrapper<T>
impl<T> Drop for SendWrapper<T>
source§fn drop(&mut self)
fn drop(&mut self)
Drops the contained value.
Panics
Dropping panics if it is done from a different thread than the one the SendWrapper
impl<T> Send for SendWrapper<T>
impl<T> Sync for SendWrapper<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for SendWrapper<T>where T: RefUnwindSafe,
impl<T> Unpin for SendWrapper<T>
impl<T> UnwindSafe for SendWrapper<T>where T: RefUnwindSafe,
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