Struct QVector

Source
#[repr(C)]
pub struct QVector<T>
where T: QVectorElement,
{ /* private fields */ }
Expand description

The QVector class is a template class that provides a dynamic array.

To use QVector with a custom type, implement the QVectorElement trait for T.

Implementations§

Source§

impl QVector<bool>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<bool>

Source

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

Source§

impl QVector<f32>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<f32>

Source

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

Source§

impl QVector<f64>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<f64>

Source

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

Source§

impl QVector<i8>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<i8>

Source

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

Source§

impl QVector<i16>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<i16>

Source

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

Source§

impl QVector<i32>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<i32>

Source

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

Source§

impl QVector<i64>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<i64>

Source

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

Source§

impl QVector<QByteArray>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QByteArray>

Source

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

Source§

impl QVector<QDate>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QDate>

Source

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

Source§

impl QVector<QDateTime>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QDateTime>

Source

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

Source§

impl QVector<QLine>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QLine>

Source

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

Source§

impl QVector<QLineF>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QLineF>

Source

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

Source§

impl QVector<QMargins>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QMargins>

Source

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

Source§

impl QVector<QMarginsF>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QMarginsF>

Source

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

Source§

impl QVector<QPersistentModelIndex>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QPersistentModelIndex>

Source§

impl QVector<QPoint>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QPoint>

Source

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

Source§

impl QVector<QPointF>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QPointF>

Source

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

Source§

impl QVector<QRect>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QRect>

Source

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

Source§

impl QVector<QRectF>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QRectF>

Source

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

Source§

impl QVector<QSize>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QSize>

Source

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

Source§

impl QVector<QSizeF>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QSizeF>

Source

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

Source§

impl QVector<QString>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QString>

Source

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

Source§

impl QVector<QTime>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QTime>

Source

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

Source§

impl QVector<QUrl>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QUrl>

Source

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

Source§

impl QVector<QVariant>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<QVariant>

Source

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

Source§

impl QVector<u8>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<u8>

Source

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

Source§

impl QVector<u16>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<u16>

Source

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

Source§

impl QVector<u32>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<u32>

Source

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

Source§

impl QVector<u64>

Source

pub fn cxx_clear(&mut self)

Source§

impl QVector<u64>

Source

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

Source§

impl<T> QVector<T>
where T: QVectorElement,

Source

pub fn append_clone(&mut self, value: &T)

Inserts value at the end of the vector.

The value is a reference here so it can be opaque or trivial but note that the value is copied when being appended into the vector.

Source

pub fn clear(&mut self)

Removes all elements from the vector.

Source

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

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

Source

pub fn get(&self, index: isize) -> Option<&T>

Returns the item at index position in the vector.

index must be a valid position in the vector (i.e., 0 <= index < len()).

Source

pub fn index_of(&self, value: &T) -> isize

Returns the index position of the first occurrence of value in the vector, searching forward from index position from. Returns -1 if no item matched.

Source

pub fn insert_clone(&mut self, pos: isize, value: &T)

Inserts item value into the vector at the given position.

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 vector.

Source

pub fn is_empty(&self) -> bool

Returns true if the vector 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 vector.

Source

pub fn reserve(&mut self, size: isize)

Reserve the specified capacity to prevent repeated allocations when the maximum size is known.

Source

pub fn remove(&mut self, pos: isize)

Removes the element at index position.

Source§

impl<T> QVector<T>
where T: QVectorElement + ExternType<Kind = Trivial>,

Source

pub fn append(&mut self, value: T)

Inserts value at the end of the vector.

Source

pub fn insert(&mut self, pos: isize, value: T)

Inserts item value into the vector at the given position.

Trait Implementations§

Source§

impl<T> Clone for QVector<T>
where T: QVectorElement,

Source§

fn clone(&self) -> Self

Constructs a copy of the QVector.

1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<T> Default for QVector<T>
where T: QVectorElement,

Source§

fn default() -> Self

Constructs an empty vector.

Source§

impl<T> Drop for QVector<T>
where T: QVectorElement,

Source§

fn drop(&mut self)

Destroys the QVector.

Source§

impl<T> ExternType for QVector<T>

Source§

type Id = <T as QVectorElement>::TypeId

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

type Kind = Trivial

Source§

impl<T> From<&QVector<T>> for Vec<T>
where T: QVectorElement + Clone,

Source§

fn from(qvec: &QVector<T>) -> Self

Convert a reference to a QVector into a Vec by making a deep copy of the data. The original QVector can still be used after constructing the Vec.

Source§

impl<T, S> From<S> for QVector<T>
where T: QVectorElement + Clone, S: AsRef<[T]>,

Source§

fn from(vec: S) -> Self

Convert anything that can be cheaply converted to a slice, such as an array or Vec, into a QVector by making a deep copy of the data. The original slice can still be used after constructing the QVector.

Source§

impl<T> PartialEq for QVector<T>

Source§

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

Returns true if both vectors contain the same elements in the same order

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 QVector<T>
where T: QVectorElement + Eq,

Auto Trait Implementations§

§

impl<T> Freeze for QVector<T>

§

impl<T> RefUnwindSafe for QVector<T>
where T: RefUnwindSafe,

§

impl<T> Send for QVector<T>
where T: Send,

§

impl<T> Sync for QVector<T>
where T: Sync,

§

impl<T> Unpin for QVector<T>
where T: Unpin,

§

impl<T> UnwindSafe for QVector<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.