pub struct Handle<T> { /* private fields */ }
Expand description
A handle can be obtained from any instance of a linked object and used to create new instances from the same family on any thread.
Contrast this to cloning the linked object, which can only create a new instance on the same
thread because linked object instances do not implement Send
and cannot be moved across
threads.
§Thread safety
The handle is thread-safe and may be used on any thread.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Handle<T>
impl<T> !RefUnwindSafe for Handle<T>
impl<T> Send for Handle<T>
impl<T> Sync for Handle<T>
impl<T> Unpin for Handle<T>
impl<T> !UnwindSafe for Handle<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