pub struct ObjectRef<T> { /* private fields */ }
Expand description
A reference to an object in an ObjectStore
. This can be held in any
thread, even if T
isn’t Send
or Sync
, because in such a case, to
access the object, you’ll still need to be on the thread owning the
ObjectStore
.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ObjectRef<T>
impl<T> RefUnwindSafe for ObjectRef<T>
impl<T> Send for ObjectRef<T>
impl<T> Sync for ObjectRef<T>
impl<T> Unpin for ObjectRef<T>
impl<T> UnwindSafe for ObjectRef<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