Struct 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<bool>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<bool>

Source

pub fn cxx_contains(&self, arg0: &bool) -> bool

Source§

impl QSet<bool>

Source

pub fn cxx_remove(&mut self, arg0: &bool) -> bool

Source§

impl QSet<f32>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<f32>

Source

pub fn cxx_contains(&self, arg0: &f32) -> bool

Source§

impl QSet<f32>

Source

pub fn cxx_remove(&mut self, arg0: &f32) -> bool

Source§

impl QSet<f64>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<f64>

Source

pub fn cxx_contains(&self, arg0: &f64) -> bool

Source§

impl QSet<f64>

Source

pub fn cxx_remove(&mut self, arg0: &f64) -> bool

Source§

impl QSet<i8>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<i8>

Source

pub fn cxx_contains(&self, arg0: &i8) -> bool

Source§

impl QSet<i8>

Source

pub fn cxx_remove(&mut self, arg0: &i8) -> bool

Source§

impl QSet<i16>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<i16>

Source

pub fn cxx_contains(&self, arg0: &i16) -> bool

Source§

impl QSet<i16>

Source

pub fn cxx_remove(&mut self, arg0: &i16) -> bool

Source§

impl QSet<i32>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<i32>

Source

pub fn cxx_contains(&self, arg0: &i32) -> bool

Source§

impl QSet<i32>

Source

pub fn cxx_remove(&mut self, arg0: &i32) -> bool

Source§

impl QSet<i64>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<i64>

Source

pub fn cxx_contains(&self, arg0: &i64) -> bool

Source§

impl QSet<i64>

Source

pub fn cxx_remove(&mut self, arg0: &i64) -> bool

Source§

impl QSet<QByteArray>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<QByteArray>

Source

pub fn cxx_contains(&self, arg0: &QByteArray) -> bool

Source§

impl QSet<QByteArray>

Source

pub fn cxx_remove(&mut self, arg0: &QByteArray) -> bool

Source§

impl QSet<QDate>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<QDate>

Source

pub fn cxx_contains(&self, arg0: &QDate) -> bool

Source§

impl QSet<QDate>

Source

pub fn cxx_remove(&mut self, arg0: &QDate) -> bool

Source§

impl QSet<QDateTime>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<QDateTime>

Source

pub fn cxx_contains(&self, arg0: &QDateTime) -> bool

Source§

impl QSet<QDateTime>

Source

pub fn cxx_remove(&mut self, arg0: &QDateTime) -> bool

Source§

impl QSet<QPersistentModelIndex>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<QPersistentModelIndex>

Source§

impl QSet<QPersistentModelIndex>

Source

pub fn cxx_remove(&mut self, arg0: &QPersistentModelIndex) -> bool

Source§

impl QSet<QString>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<QString>

Source

pub fn cxx_contains(&self, arg0: &QString) -> bool

Source§

impl QSet<QString>

Source

pub fn cxx_remove(&mut self, arg0: &QString) -> bool

Source§

impl QSet<QTime>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<QTime>

Source

pub fn cxx_contains(&self, arg0: &QTime) -> bool

Source§

impl QSet<QTime>

Source

pub fn cxx_remove(&mut self, arg0: &QTime) -> bool

Source§

impl QSet<QUrl>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<QUrl>

Source

pub fn cxx_contains(&self, arg0: &QUrl) -> bool

Source§

impl QSet<QUrl>

Source

pub fn cxx_remove(&mut self, arg0: &QUrl) -> bool

Source§

impl QSet<u8>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<u8>

Source

pub fn cxx_contains(&self, arg0: &u8) -> bool

Source§

impl QSet<u8>

Source

pub fn cxx_remove(&mut self, arg0: &u8) -> bool

Source§

impl QSet<u16>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<u16>

Source

pub fn cxx_contains(&self, arg0: &u16) -> bool

Source§

impl QSet<u16>

Source

pub fn cxx_remove(&mut self, arg0: &u16) -> bool

Source§

impl QSet<u32>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<u32>

Source

pub fn cxx_contains(&self, arg0: &u32) -> bool

Source§

impl QSet<u32>

Source

pub fn cxx_remove(&mut self, arg0: &u32) -> bool

Source§

impl QSet<u64>

Source

pub fn cxx_clear(&mut self)

Source§

impl QSet<u64>

Source

pub fn cxx_contains(&self, arg0: &u64) -> bool

Source§

impl QSet<u64>

Source

pub fn cxx_remove(&mut self, arg0: &u64) -> bool

Source§

impl<T> QSet<T>
where T: QSetElement,

Source

pub fn clear(&mut self)

Removes all elements from the set.

Source

pub fn contains(&self, value: &T) -> bool

Returns true if the set contains item value; otherwise returns false.

Source

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.

Source

pub fn is_empty(&self) -> bool

Returns true if the set contains no elements; otherwise returns false.

Source

pub fn iter(&self) -> Iter<'_, T>

An iterator visiting all elements in arbitrary order. The iterator element type is &’a T.

Source

pub fn len(&self) -> isize

Returns the number of items in the set.

Source

pub fn remove(&mut self, value: &T) -> bool

Removes any occurrence of item value from the set. Returns true if an item was actually removed; otherwise returns false.

Source§

impl<T> QSet<T>
where T: QSetElement + ExternType<Kind = Trivial>,

Source

pub fn insert(&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.

Trait Implementations§

Source§

impl<T> Clone for QSet<T>
where T: QSetElement,

Source§

fn clone(&self) -> Self

Constructs a copy of the QSet.

1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Default for QSet<T>
where T: QSetElement,

Source§

fn default() -> Self

Constructs an empty set.

Source§

impl<T> Drop for QSet<T>
where T: QSetElement,

Source§

fn drop(&mut self)

Destroys the QSet.

Source§

impl<T> ExternType for QSet<T>

Source§

type Id = <T as QSetElement>::TypeId

A type-level representation of the type’s C++ namespace and type name. Read more
Source§

type Kind = Trivial

Source§

impl<T> PartialEq for QSet<T>

Source§

fn eq(&self, other: &Self) -> bool

Returns true if both sets contain the same elements

1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Eq for QSet<T>

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.