Struct cxx_qt_lib::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<QColor>

source

pub fn cxx_clear(&mut self)

source§

impl QVector<QColor>

source

pub fn cxx_contains(&self, arg0: &QColor) -> 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<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>

§

type Id = <T as QVectorElement>::TypeId

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

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

This method 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> 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,

§

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>,

§

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>,

§

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.