Struct qt_gui::q_pixmap_cache::Key

source ·
#[repr(C)]
pub struct Key { /* private fields */ }
Expand description

The QPixmapCache::Key class can be used for efficient access to the QPixmapCache.

C++ class: QPixmapCache::Key.

C++ documentation:

The QPixmapCache::Key class can be used for efficient access to the QPixmapCache.

Use QPixmapCache::insert() to receive an instance of Key generated by the pixmap cache. You can store the key in your own objects for a very efficient one-to-one object-to-pixmap mapping.

Implementations§

source§

impl Key

source

pub unsafe fn copy_from(&self, other: impl CastInto<Ref<Key>>) -> Ref<Key>

Calls C++ function: QPixmapCache::Key& QPixmapCache::Key::operator=(const QPixmapCache::Key& other).

source

pub unsafe fn is_valid(&self) -> bool

Returns true if there is a cached pixmap associated with this key. Otherwise, if pixmap was flushed, the key is no longer valid.

Calls C++ function: bool QPixmapCache::Key::isValid() const.

C++ documentation:

Returns true if there is a cached pixmap associated with this key. Otherwise, if pixmap was flushed, the key is no longer valid.

This function was introduced in Qt 5.7.

source

pub unsafe fn new() -> CppBox<Key>

Constructs an empty Key object.

Calls C++ function: [constructor] void QPixmapCache::Key::Key().

C++ documentation:

Constructs an empty Key object.

source

pub unsafe fn new_copy(other: impl CastInto<Ref<Key>>) -> CppBox<Key>

Constructs an empty Key object.

Calls C++ function: [constructor] void QPixmapCache::Key::Key(const QPixmapCache::Key& other).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for Key::Key():

Constructs an empty Key object.

source

pub unsafe fn swap(&self, other: impl CastInto<Ref<Key>>)

Calls C++ function: void QPixmapCache::Key::swap(QPixmapCache::Key& other).

Trait Implementations§

source§

impl CppDeletable for Key

source§

unsafe fn delete(&self)

Destroys the key.

Calls C++ function: [destructor] void QPixmapCache::Key::~Key().

C++ documentation:

Destroys the key.

source§

impl PartialEq<Ref<Key>> for Key

source§

fn eq(&self, key: &Ref<Key>) -> bool

Calls C++ function: bool QPixmapCache::Key::operator==(const QPixmapCache::Key& key) const.

1.0.0 · source§

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

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

Auto Trait Implementations§

§

impl RefUnwindSafe for Key

§

impl Send for Key

§

impl Sync for Key

§

impl Unpin for Key

§

impl UnwindSafe for Key

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, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. 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> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

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

§

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>,

§

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.