Struct qmetaobject::QObjectPinned[][src]

#[repr(transparent)]
pub struct QObjectPinned<'pin, T: QObject + ?Sized + 'pin>(_);

A reference to a RefCell, where T is a QObject, which does not move in memory

Implementations

impl<'pin, T: QObject + ?Sized + 'pin> QObjectPinned<'pin, T>[src]

pub fn borrow(&self) -> &T[src]

Borrow the object

pub fn borrow_mut(&self) -> QObjectRefMut<'_, T>[src]

pub fn as_ptr(&self) -> *mut T[src]

impl<'pin, T: QObject + ?Sized + 'pin> QObjectPinned<'pin, T>[src]

pub unsafe fn new(inner: &'pin RefCell<T>) -> Self[src]

Internal function used from the code generated by the QObject derive macro unsafe because one must ensure it does not move in memory

impl<'pin, T: QObject + 'pin> QObjectPinned<'pin, T>[src]

pub fn get_or_create_cpp_object(self) -> *mut c_void[src]

Get the pointer ot the C++ Object, or crate it if it was not yet created

Trait Implementations

impl<'pin, T: QObject + ?Sized + 'pin> Clone for QObjectPinned<'pin, T>[src]

impl<'pin, T: QObject + ?Sized + 'pin> Copy for QObjectPinned<'pin, T>[src]

Auto Trait Implementations

impl<'pin, T> !RefUnwindSafe for QObjectPinned<'pin, T>

impl<'pin, T> !Send for QObjectPinned<'pin, T>

impl<'pin, T> !Sync for QObjectPinned<'pin, T>

impl<'pin, T: ?Sized> Unpin for QObjectPinned<'pin, T>

impl<'pin, T> !UnwindSafe for QObjectPinned<'pin, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.