fn clone(&self) -> Self {
		if !self.valid() {
			panic!(DEREF_ERROR);
		}
		// We need to clone the underlying data as well, not just to copy
		// the pointer.
		Self {
			data: Box::into_raw(Box::new(unsafe { &*self.data }.clone())),
			thread_id: self.thread_id,
		}
	}
/// Returns a copy of the value.
///
/// # Panics
/// Cloning panics if it is done from a different thread than the one
/// the SendWrapper<T> instance has been created with.
Returns a copy of the value.
Returns a copy of the value .
fn clone(&self) -> Self {
		if !self.valid() {
			panic!(DEREF_ERROR);
		}
		// We need to clone the underlying data as well, not just to copy
		// the pointer.
		Self {
			data: Box::into_raw(Box::new(unsafe { &*self.data }.clone())),
			thread_id: self.thread_id,
		}
	}
fn clone ( & self ) -> Self { if ! self . valid ( ) { panic ! ( DEREF_ERROR ) ; } // We need to clone the underlying data as well, not just to copy // the pointer. Self { data : Box :: into_raw ( Box :: new ( unsafe { & * self . data } . clone ( ) ) ) , thread_id : self . thread_id , } }
Returns a copy of the value.
Returns a copy of the value .
&self
&self
panics
Cloning panics if it is done from a different thread than the one
the SendWrapper instance has been created with.
Cloning panics if it is done from a different thread than the one the SendWrapper instance has been created with .