Trait cxx_qt_lib::QHashPair

source ·
pub trait QHashPair: Sized {
    type Key;
    type Value;
    type TypeId;

    // Required methods
    fn clear(hash: &mut QHash<Self>);
    fn clone(hash: &QHash<Self>) -> QHash<Self>;
    fn contains(hash: &QHash<Self>, key: &Self::Key) -> bool;
    fn default() -> QHash<Self>;
    fn drop(hash: &mut QHash<Self>);
    fn get_or_default(hash: &QHash<Self>, key: &Self::Key) -> Self::Value;
    unsafe fn get_unchecked_key(hash: &QHash<Self>, pos: isize) -> &Self::Key;
    unsafe fn get_unchecked_value(
        hash: &QHash<Self>,
        pos: isize
    ) -> &Self::Value;
    fn insert(hash: &mut QHash<Self>, key: Self::Key, value: Self::Value)
       where Self::Key: ExternType<Kind = Trivial>,
             Self::Value: ExternType<Kind = Trivial>;
    fn insert_clone(
        hash: &mut QHash<Self>,
        key: &Self::Key,
        value: &Self::Value
    );
    fn len(hash: &QHash<Self>) -> isize;
    fn remove(hash: &mut QHash<Self>, key: &Self::Key) -> bool;
}
Expand description

Trait implementation for a pair in a QHash.

Required Associated Types§

Required Methods§

source

fn clear(hash: &mut QHash<Self>)

source

fn clone(hash: &QHash<Self>) -> QHash<Self>

source

fn contains(hash: &QHash<Self>, key: &Self::Key) -> bool

source

fn default() -> QHash<Self>

source

fn drop(hash: &mut QHash<Self>)

source

fn get_or_default(hash: &QHash<Self>, key: &Self::Key) -> Self::Value

source

unsafe fn get_unchecked_key(hash: &QHash<Self>, pos: isize) -> &Self::Key

§Safety

Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used.

source

unsafe fn get_unchecked_value(hash: &QHash<Self>, pos: isize) -> &Self::Value

§Safety

Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used.

source

fn insert(hash: &mut QHash<Self>, key: Self::Key, value: Self::Value)
where Self::Key: ExternType<Kind = Trivial>, Self::Value: ExternType<Kind = Trivial>,

source

fn insert_clone(hash: &mut QHash<Self>, key: &Self::Key, value: &Self::Value)

source

fn len(hash: &QHash<Self>) -> isize

source

fn remove(hash: &mut QHash<Self>, key: &Self::Key) -> bool

Object Safety§

This trait is not object safe.

Implementors§

source§

impl QHashPair for QHashPair_QString_QVariant

§

type Key = QString

§

type Value = QVariant

§

type TypeId = (Q, H, a, s, h, __, Q, S, t, r, i, n, g, __, Q, V, a, r, i, a, n, t)

source§

impl QHashPair for QHashPair_i32_QByteArray

§

type Key = i32

§

type Value = QByteArray

§

type TypeId = (Q, H, a, s, h, __, i, _3, _2, __, Q, B, y, t, e, A, r, r, a, y)