pub struct HandleRef<'ty, T> { /* private fields */ }
Implementations§
Source§impl<'ty, T> HandleRef<'ty, T>
impl<'ty, T> HandleRef<'ty, T>
pub fn new( ty: &'ty HandleType<T>, handle: HandleId, owner: IdentityTokenPtr, ) -> Result<Self, HandleError>
pub fn clone_handle( &self, new_owner: IdentityTokenPtr, ) -> Result<HandleId, HandleError>
Trait Implementations§
Source§impl<T> DerefMut for HandleRef<'_, T>
This is unsound if multiple HandleRef
s are created wrapping the same Handle data.
impl<T> DerefMut for HandleRef<'_, T>
This is unsound if multiple HandleRef
s are created wrapping the same Handle data.
To guarantee safety, do not use mutable HandleRefs but instead use a std::cell::RefCell
wrapper inside your HandleType
.
Source§impl<'ctx, 'ty, T: HasHandleType> TryFromPlugin<'ctx> for HandleRef<'ty, T>
impl<'ctx, 'ty, T: HasHandleType> TryFromPlugin<'ctx> for HandleRef<'ty, T>
type Error = HandleError
fn try_from_plugin( ctx: &'ctx IPluginContext, value: cell_t, ) -> Result<Self, Self::Error>
Auto Trait Implementations§
impl<'ty, T> Freeze for HandleRef<'ty, T>
impl<'ty, T> RefUnwindSafe for HandleRef<'ty, T>where
T: RefUnwindSafe,
impl<'ty, T> !Send for HandleRef<'ty, T>
impl<'ty, T> !Sync for HandleRef<'ty, T>
impl<'ty, T> Unpin for HandleRef<'ty, T>
impl<'ty, T> UnwindSafe for HandleRef<'ty, 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