Struct cxx_qt_lib::QSet
source · #[repr(C)]pub struct QSet<T>where
T: QSetElement,{ /* private fields */ }
Expand description
The QSet class is a template class that provides a hash-table-based set.
Note that this means that T needs to have a global qHash()
function.
To use QSet with a custom type, implement the QSetElement
trait for T.
Implementations§
source§impl QSet<QByteArray>
impl QSet<QByteArray>
pub fn cxx_contains(&self, arg0: &QByteArray) -> bool
source§impl QSet<QByteArray>
impl QSet<QByteArray>
pub fn cxx_remove(&mut self, arg0: &QByteArray) -> bool
source§impl QSet<QPersistentModelIndex>
impl QSet<QPersistentModelIndex>
pub fn cxx_contains(&self, arg0: &QPersistentModelIndex) -> bool
source§impl QSet<QPersistentModelIndex>
impl QSet<QPersistentModelIndex>
pub fn cxx_remove(&mut self, arg0: &QPersistentModelIndex) -> bool
source§impl<T> QSet<T>where
T: QSetElement,
impl<T> QSet<T>where
T: QSetElement,
sourcepub fn contains(&self, value: &T) -> bool
pub fn contains(&self, value: &T) -> bool
Returns true if the set contains item value; otherwise returns false.
sourcepub fn insert_clone(&mut self, value: &T)
pub fn insert_clone(&mut self, value: &T)
Inserts item value into the set, if value isn’t already in the set, and returns an iterator pointing at the inserted item.
The value is a reference here so it can be opaque or trivial but note that the value is copied when being inserted into the set.
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the set contains no elements; otherwise returns false.
Trait Implementations§
source§impl<T> Clone for QSet<T>where
T: QSetElement,
impl<T> Clone for QSet<T>where
T: QSetElement,
source§impl<T> Default for QSet<T>where
T: QSetElement,
impl<T> Default for QSet<T>where
T: QSetElement,
source§impl<T> ExternType for QSet<T>where
T: ExternType + QSetElement,
impl<T> ExternType for QSet<T>where
T: ExternType + QSetElement,
impl<T> Eq for QSet<T>where
T: QSetElement + PartialEq,
Auto Trait Implementations§
impl<T> Freeze for QSet<T>
impl<T> RefUnwindSafe for QSet<T>where
T: RefUnwindSafe,
impl<T> Send for QSet<T>where
T: Send,
impl<T> Sync for QSet<T>where
T: Sync,
impl<T> Unpin for QSet<T>where
T: Unpin,
impl<T> UnwindSafe for QSet<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more