pub struct Transferable { /* private fields */ }
Expand description
Normally references are single-threaded, but they can be sent between threads only by means of transfer mechanism. Transfer mechanism works like this: For transferred reference, we construct graph of connected unpacked objects, replacing their original content objects with special Transferred type, so they cannot be accessed later in original thread. We send that graph and on the other thread we reconstruct objects and references from that graph and return main one.
Trait Implementations§
Source§impl Debug for Transferable
impl Debug for Transferable
Source§impl From<Reference> for Transferable
impl From<Reference> for Transferable
Source§fn from(value: Reference) -> Transferable
fn from(value: Reference) -> Transferable
Converts to this type from the input type.
Source§impl From<Transferable> for Reference
impl From<Transferable> for Reference
Source§fn from(value: Transferable) -> Reference
fn from(value: Transferable) -> Reference
Converts to this type from the input type.
impl Send for Transferable
impl Sync for Transferable
Auto Trait Implementations§
impl Freeze for Transferable
impl RefUnwindSafe for Transferable
impl Unpin for Transferable
impl UnwindSafe for Transferable
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