Struct Type

Source
pub struct Type(/* private fields */);
Expand description

This enum type defines the types of variable that a QVariant can contain.

C++ enum: QVariant::Type.

C++ documentation:

This enum type defines the types of variable that a QVariant can contain.

Related Non-Members

Implementations§

Source§

impl Type

Source

pub fn to_int(&self) -> c_int

Source§

impl Type

Source

pub const Invalid: Type

no type (C++ enum variant: Invalid = 0)

Source

pub const Bool: Type

a bool (C++ enum variant: Bool = 1)

Source

pub const Int: Type

an int (C++ enum variant: Int = 2)

Source

pub const UInt: Type

a uint (C++ enum variant: UInt = 3)

Source

pub const LongLong: Type

a qlonglong (C++ enum variant: LongLong = 4)

Source

pub const ULongLong: Type

a qulonglong (C++ enum variant: ULongLong = 5)

Source

pub const Double: Type

a double (C++ enum variant: Double = 6)

Source

pub const Char: Type

a QChar (C++ enum variant: Char = 7)

Source

pub const Map: Type

a QVariantMap (C++ enum variant: Map = 8)

Source

pub const List: Type

a QVariantList (C++ enum variant: List = 9)

Source

pub const String: Type

a QString (C++ enum variant: String = 10)

Source

pub const StringList: Type

a QStringList (C++ enum variant: StringList = 11)

Source

pub const ByteArray: Type

a QByteArray (C++ enum variant: ByteArray = 12)

Source

pub const BitArray: Type

a QBitArray (C++ enum variant: BitArray = 13)

Source

pub const Date: Type

a QDate (C++ enum variant: Date = 14)

Source

pub const Time: Type

a QTime (C++ enum variant: Time = 15)

Source

pub const DateTime: Type

a QDateTime (C++ enum variant: DateTime = 16)

Source

pub const Url: Type

a QUrl (C++ enum variant: Url = 17)

Source

pub const Locale: Type

a QLocale (C++ enum variant: Locale = 18)

Source

pub const Rect: Type

a QRect (C++ enum variant: Rect = 19)

Source

pub const RectF: Type

a QRectF (C++ enum variant: RectF = 20)

Source

pub const Size: Type

a QSize (C++ enum variant: Size = 21)

Source

pub const SizeF: Type

a QSizeF (C++ enum variant: SizeF = 22)

Source

pub const Line: Type

a QLine (C++ enum variant: Line = 23)

Source

pub const LineF: Type

a QLineF (C++ enum variant: LineF = 24)

Source

pub const Point: Type

a QPoint (C++ enum variant: Point = 25)

Source

pub const PointF: Type

a QPointF (C++ enum variant: PointF = 26)

Source

pub const RegExp: Type

a QRegExp (C++ enum variant: RegExp = 27)

Source

pub const RegularExpression: Type

a QRegularExpression (C++ enum variant: RegularExpression = 44)

Source

pub const Hash: Type

a QVariantHash (C++ enum variant: Hash = 28)

Source

pub const EasingCurve: Type

a QEasingCurve (C++ enum variant: EasingCurve = 29)

Source

pub const Uuid: Type

a QUuid (C++ enum variant: Uuid = 30)

Source

pub const ModelIndex: Type

a QModelIndex (C++ enum variant: ModelIndex = 42)

Source

pub const PersistentModelIndex: Type

a QPersistentModelIndex (since 5.5) (C++ enum variant: PersistentModelIndex = 50)

Source

pub const LastCoreType: Type

C++ enum variant: LastCoreType = 51

Source

pub const Font: Type

a QFont (C++ enum variant: Font = 64)

Source

pub const Pixmap: Type

a QPixmap (C++ enum variant: Pixmap = 65)

Source

pub const Brush: Type

a QBrush (C++ enum variant: Brush = 66)

Source

pub const Color: Type

a QColor (C++ enum variant: Color = 67)

Source

pub const Palette: Type

a QPalette (C++ enum variant: Palette = 68)

Source

pub const Image: Type

a QImage (C++ enum variant: Image = 70)

Source

pub const Polygon: Type

a QPolygon (C++ enum variant: Polygon = 71)

Source

pub const Region: Type

a QRegion (C++ enum variant: Region = 72)

Source

pub const Bitmap: Type

a QBitmap (C++ enum variant: Bitmap = 73)

Source

pub const Cursor: Type

a QCursor (C++ enum variant: Cursor = 74)

Source

pub const KeySequence: Type

a QKeySequence (C++ enum variant: KeySequence = 75)

Source

pub const Pen: Type

a QPen (C++ enum variant: Pen = 76)

Source

pub const TextLength: Type

a QTextLength (C++ enum variant: TextLength = 77)

Source

pub const TextFormat: Type

a QTextFormat (C++ enum variant: TextFormat = 78)

Source

pub const Matrix: Type

a QMatrix (C++ enum variant: Matrix = 79)

Source

pub const Transform: Type

a QTransform (C++ enum variant: Transform = 80)

Source

pub const Matrix4X4: Type

a QMatrix4x4 (C++ enum variant: Matrix4x4 = 81)

Source

pub const Vector2D: Type

a QVector2D (C++ enum variant: Vector2D = 82)

Source

pub const Vector3D: Type

a QVector3D (C++ enum variant: Vector3D = 83)

Source

pub const Vector4D: Type

a QVector4D (C++ enum variant: Vector4D = 84)

Source

pub const Quaternion: Type

a QQuaternion (C++ enum variant: Quaternion = 85)

Source

pub const PolygonF: Type

a QPolygonF (C++ enum variant: PolygonF = 86)

Source

pub const Icon: Type

a QIcon (C++ enum variant: Icon = 69)

Source

pub const LastGuiType: Type

C++ enum variant: LastGuiType = 86

Source

pub const SizePolicy: Type

a QSizePolicy (C++ enum variant: SizePolicy = 121)

Source

pub const UserType: Type

Base value for user-defined types. (C++ enum variant: UserType = 1024)

Source

pub const LastType: Type

C++ enum variant: LastType = -1

Source

pub const LastCoreType2: Type

C++ enum variant: LastCoreType = 55

Trait Implementations§

Source§

impl Clone for Type

Source§

fn clone(&self) -> Type

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Type

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Type> for c_int

Source§

fn from(value: Type) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Type

Source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Type

Source§

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

Tests for self and other values to be equal, and is used by ==.
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 Shl<Type> for &QDataStream

Source§

fn shl(self, p: Type) -> Ref<QDataStream>

Writes bit array ba to stream out.

Calls C++ function: QDataStream& operator<<(QDataStream& s, QVariant::Type p).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for QDataStream &operator<<(QDataStream &out, const QBitArray &ba):

Writes bit array ba to stream out.

See also Format of the QDataStream operators.

Source§

type Output = Ref<QDataStream>

The resulting type after applying the << operator.
Source§

impl Shl<Type> for &QDebug

Source§

fn shl(self, arg2: Type) -> CppBox<QDebug>

Writes bit array ba to stream out.

Calls C++ function: QDebug operator<<(QDebug arg1, QVariant::Type arg2).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for QDataStream &operator<<(QDataStream &out, const QBitArray &ba):

Writes bit array ba to stream out.

See also Format of the QDataStream operators.

Source§

type Output = CppBox<QDebug>

The resulting type after applying the << operator.
Source§

impl Copy for Type

Source§

impl Eq for Type

Source§

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl Freeze for Type

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

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, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

unsafe fn cast_into(self) -> U

Performs the conversion. 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> StaticUpcast<T> for T

Source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
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.