pub struct OrdinalSortKey {
pub order: f64,
/* private fields */
}Expand description
A SemanticsSortKey that sorts based on the f64 value it is
given.
The OrdinalSortKey compares itself with other OrdinalSortKeys
to sort based on the order it is given.
OrdinalSortKeys are sorted by the optional name, then by
their order. If SemanticsProperties::sort_key is a OrdinalSortKey,
then all the other specified sort keys in the same semantics group must also be
OrdinalSortKeys.
The ordinal value order is typically a whole number, though it can be
fractional, e.g. in order to fit between two other consecutive whole
numbers. The value must be finite (it cannot be NaN or infinite).
Fields§
§order: f64Determines the placement of this key in a sequence of keys that defines the order in which this node is traversed by the platform’s accessibility services.
Lower values will be traversed first. Keys with the same name will be grouped together and sorted by name first, and then sorted by order.
Implementations§
Source§impl OrdinalSortKey
impl OrdinalSortKey
Sourcepub fn new(order: f64) -> OrdinalSortKey
pub fn new(order: f64) -> OrdinalSortKey
Creates a semantics sort key that uses a f64 as its key value.
The order must be a finite number.
Sourcepub fn name(self, name: impl Into<String>) -> OrdinalSortKey
pub fn name(self, name: impl Into<String>) -> OrdinalSortKey
Dart OrdinalSortKey(name:).