Struct cxx_qt_lib::QVariant[][src]

#[repr(C)]
pub struct QVariant { /* fields omitted */ }
Expand description

Binding to Qt QVariant.

Invariants

As an invariant of this API and the static analysis of the cxx::bridge macro, in Rust code we can never obtain a QVariant by value. Qt’s QVariant requires a move constructor and may hold internal pointers, which is not compatible with Rust’s move behavior. Instead in Rust code we will only ever look at a QVariant through a reference or smart pointer, as in &QVariant or UniquePtr<QVariant>.

Implementations

QVariant is not constructible via new. Instead, use the let_qvariant! macro.

Create a new Rust Variant from this QVariant. This is a copy operation so any changes will not propagate to the original QVariant.

Trait Implementations

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

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.