Trait QMapPair

Source
pub trait QMapPair: Sized {
    type Key;
    type Value;
    type TypeId;

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

Trait implementation for a pair in a QMap.

Required Associated Types§

Required Methods§

Source

fn clear(map: &mut QMap<Self>)

Source

fn clone(map: &QMap<Self>) -> QMap<Self>

Source

fn contains(map: &QMap<Self>, key: &Self::Key) -> bool

Source

fn default() -> QMap<Self>

Source

fn drop(map: &mut QMap<Self>)

Source

fn get_or_default(map: &QMap<Self>, key: &Self::Key) -> Self::Value

Source

unsafe fn get_unchecked_key(map: &QMap<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(map: &QMap<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(map: &mut QMap<Self>, key: Self::Key, value: Self::Value)
where Self::Key: ExternType<Kind = Trivial>, Self::Value: ExternType<Kind = Trivial>,

Source

fn insert_clone(map: &mut QMap<Self>, key: &Self::Key, value: &Self::Value)

Source

fn len(map: &QMap<Self>) -> isize

Source

fn remove(map: &mut QMap<Self>, key: &Self::Key) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl QMapPair for QMapPair_QString_QVariant

Source§

type Key = QString

Source§

type Value = QVariant

Source§

type TypeId = (Q, M, a, p, __, Q, S, t, r, i, n, g, __, Q, V, a, r, i, a, n, t)