Skip to main content

QObjectMutPtr

Struct QObjectMutPtr 

pub struct QObjectMutPtr(/* private fields */);
Expand description

A thin wrapper around *mut QObject. Using the ‘newtype’ idiom lets us implement ExternType for it, which wouldn’t be possible for pure *mut QObject itself.

Implementations§

§

impl QObjectMutPtr

pub unsafe fn from_raw(raw: *mut QObject) -> QObjectMutPtr

Create a new instance from a raw pointer.

§Safety

The pointer is passed to C++ as a QObject* and may be dereferenced there. This wrapper tracks neither ownership nor lifetime, so the object must outlive every use of the underlying QObject pointer (including any copy stored in a QVariant or QList).

pub fn as_ptr(&self) -> *const QObject

Return a wrapped raw const pointer.

pub fn as_mut_ptr(&self) -> *mut QObject

Return a wrapped raw mut pointer.

pub fn into_raw(self) -> *mut QObject

Consume an object a return a wrapped raw mut pointer.

Trait Implementations§

§

impl Clone for QObjectMutPtr

§

fn clone(&self) -> QObjectMutPtr

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for QObjectMutPtr

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl ExternType for QObjectMutPtr

§

type Id = (Q, O, b, j, e, c, t, M, u, t, P, t, r)

A type-level representation of the type’s C++ namespace and type name. Read more
§

type Kind = Trivial

§

impl PartialEq for QObjectMutPtr

§

fn eq(&self, other: &QObjectMutPtr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl QListElement for QObjectMutPtr

§

type TypeId = (Q, L, i, s, t, __, Q, O, b, j, e, c, t, M, u, t, P, t, r)

§

fn append(list: &mut QList<QObjectMutPtr>, value: QObjectMutPtr)

§

fn append_clone(list: &mut QList<QObjectMutPtr>, value: &QObjectMutPtr)

§

fn clear(list: &mut QList<QObjectMutPtr>)

§

fn clone(list: &QList<QObjectMutPtr>) -> QList<QObjectMutPtr>

§

fn contains(list: &QList<QObjectMutPtr>, value: &QObjectMutPtr) -> bool

§

fn default() -> QList<QObjectMutPtr>

§

fn drop(list: &mut QList<QObjectMutPtr>)

§

unsafe fn get_unchecked( list: &QList<QObjectMutPtr>, pos: isize, ) -> &QObjectMutPtr

Safety Read more
§

fn index_of(list: &QList<QObjectMutPtr>, value: &QObjectMutPtr) -> isize

§

fn insert(list: &mut QList<QObjectMutPtr>, pos: isize, value: QObjectMutPtr)

§

fn insert_clone( list: &mut QList<QObjectMutPtr>, pos: isize, value: &QObjectMutPtr, )

§

fn len(list: &QList<QObjectMutPtr>) -> isize

§

fn remove(list: &mut QList<QObjectMutPtr>, pos: isize)

§

fn reserve(list: &mut QList<QObjectMutPtr>, size: isize)

§

impl QVariantValue for QObjectMutPtr

§

fn can_convert(variant: &QVariant) -> bool

§

fn construct(value: &QObjectMutPtr) -> QVariant

§

fn value_or_default(variant: &QVariant) -> QObjectMutPtr

§

impl Copy for QObjectMutPtr

§

impl Eq for QObjectMutPtr

§

impl StructuralPartialEq for QObjectMutPtr

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.