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

The Rust representation of Qt’s QDateTime

Internally this holds a UniquePtr to a QDateTimeCpp which has been constructed on the C++ side.

Implementations

Construct a Rust QDateTime from an existing QDateTimeCpp, this is a copy operation.

Construct a Rust QDateTime from a given QDate and QTime

Returns the date part of the datetime.

Returns the time part of the datetime.

Sets the date part of this datetime to date. If no time is set yet, it is set to midnight. If date is invalid, this QDateTime becomes invalid.

Sets the time part of this datetime to time. If time is not valid, this function sets it to midnight. Therefore, it’s possible to clear any set time in a QDateTimeCpp by setting it to a default QTime:

Trait Implementations

Returns the “default value” for a type. Read more

Retrieve the UniquePtr to the Qt QDateTimeCpp of this Rust QDateTime so that this object can be passed back to C++.

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