Struct qt_core::QCollatorSortKey
source · #[repr(C)]pub struct QCollatorSortKey { /* private fields */ }
Expand description
The QCollatorSortKey class can be used to speed up string collation.
C++ class: QCollatorSortKey
.
The QCollatorSortKey class can be used to speed up string collation.
The QCollatorSortKey class is always created by QCollator::sortKey() and is used for fast strings collation, for example when collating many strings.
Implementations§
source§impl QCollatorSortKey
impl QCollatorSortKey
sourcepub unsafe fn compare(&self, key: impl CastInto<Ref<QCollatorSortKey>>) -> c_int
pub unsafe fn compare(&self, key: impl CastInto<Ref<QCollatorSortKey>>) -> c_int
Compares the key to otherKey. Returns a negative value if the key is less than otherKey, 0 if the key is equal to otherKey or a positive value if the key is greater than otherKey.
Calls C++ function: int QCollatorSortKey::compare(const QCollatorSortKey& key) const
.
Compares the key to otherKey. Returns a negative value if the key is less than otherKey, 0 if the key is equal to otherKey or a positive value if the key is greater than otherKey.
See also operator<().
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QCollatorSortKey>>
) -> Ref<QCollatorSortKey>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QCollatorSortKey>> ) -> Ref<QCollatorSortKey>
Assigns other to this collator key.
Calls C++ function: QCollatorSortKey& QCollatorSortKey::operator=(const QCollatorSortKey& other)
.
Assigns other to this collator key.
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QCollatorSortKey>>
) -> CppBox<QCollatorSortKey>
pub unsafe fn new_copy( other: impl CastInto<Ref<QCollatorSortKey>> ) -> CppBox<QCollatorSortKey>
Constructs a copy of the other collator key.
Calls C++ function: [constructor] void QCollatorSortKey::QCollatorSortKey(const QCollatorSortKey& other)
.
Constructs a copy of the other collator key.
sourcepub unsafe fn swap(&self, other: impl CastInto<Ref<QCollatorSortKey>>)
pub unsafe fn swap(&self, other: impl CastInto<Ref<QCollatorSortKey>>)
Swaps this collator key with other.
Calls C++ function: void QCollatorSortKey::swap(QCollatorSortKey& other)
.
Swaps this collator key with other.