pub struct RValueRef<T>where
T: ObjectRefCore,{ /* private fields */ }Expand description
An object argument that the callee may move out of, as ffi::RValueRef<T>
in the ABI.
The callee may take the stored strong reference without incrementing its count. If it does not, the wrapper keeps the reference and releases it when dropped.
Implementations§
Source§impl<T> RValueRef<T>where
T: ObjectRefCore,
impl<T> RValueRef<T>where
T: ObjectRefCore,
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Take the owned object without copying or incrementing its reference count.
§Panics
Panics if the object was already taken, such as by a callee that moved it out of the argument slot.
Trait Implementations§
Source§impl<T> Drop for RValueRef<T>where
T: ObjectRefCore,
impl<T> Drop for RValueRef<T>where
T: ObjectRefCore,
Source§impl<T> From<T> for RValueRef<T>where
T: ObjectRefCore,
impl<T> From<T> for RValueRef<T>where
T: ObjectRefCore,
Source§impl<T: ObjectRefCore> PackedCallArg for RValueRef<T>
impl<T: ObjectRefCore> PackedCallArg for RValueRef<T>
Auto Trait Implementations§
impl<T> !Freeze for RValueRef<T>
impl<T> !RefUnwindSafe for RValueRef<T>
impl<T> !Send for RValueRef<T>
impl<T> !Sync for RValueRef<T>
impl<T> Unpin for RValueRef<T>where
T: Unpin,
impl<T> UnsafeUnpin for RValueRef<T>
impl<T> UnwindSafe for RValueRef<T>where
T: UnwindSafe,
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