pub struct QString { /* private fields */ }
Expand description

The QString class provides a Unicode character string.

Note that QString is a UTF-16 whereas Rust strings are a UTF-8

Trait Implementations

Constructs a copy of other.

This operation takes constant time, because QString is implicitly shared. This makes returning a QString from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and that takes linear time.

Performs copy-assignment from source. Read more

Constructs a null string. Null strings are also empty.

Convert the QString to a Rust string

Note that this converts from UTF-16 to UTF-8

Destroys the string.

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

Constructs a QUrl from a QString

Constructs a QVariant from a reference of $typeName

Convert the QString to a Rust string

Note that this converts from UTF-16 to UTF-8

Constructs a QString from a Rust string

Note that this converts from UTF-8 to UTF-16

Constructs a QString from a Rust string

Note that this converts from UTF-8 to UTF-16

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
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.