[][src]Struct qt_gui::q_pixmap_cache::Key

#[repr(C)]
pub struct Key { /* fields omitted */ }

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.

Methods

impl Key[src]

pub unsafe fn copy_from(
    &mut self,
    other: impl CastInto<Ref<Key>>
) -> MutRef<Key>
[src]

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

pub unsafe fn is_valid(&self) -> bool[src]

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.

pub unsafe fn new() -> CppBox<Key>[src]

Constructs an empty Key object.

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

C++ documentation:

Constructs an empty Key object.

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

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.

pub unsafe fn swap(&mut self, other: impl CastInto<MutRef<Key>>)[src]

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

Trait Implementations

impl CppDeletable for Key[src]

unsafe fn delete(&mut self)[src]

Destroys the key.

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

C++ documentation:

Destroys the key.

impl PartialEq<Ref<Key>> for Key[src]

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

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

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

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

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

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

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

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.