Trait cxx_qt_lib::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§
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
sourceunsafe fn get_unchecked_key(map: &QMap<Self>, pos: isize) -> &Self::Key
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.
sourceunsafe fn get_unchecked_value(map: &QMap<Self>, pos: isize) -> &Self::Value
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.
fn insert(map: &mut QMap<Self>, key: Self::Key, value: Self::Value)
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
Object Safety§
This trait is not object safe.