pub enum Accessibility<'a> {
Label(&'a str),
Hint(&'a str),
Value(&'a str),
Hidden(bool),
Identifier(&'a str),
SortPriority(f64),
ActivationPoint(f64, f64),
InputLabels(&'a [&'a str]),
SelectionIdentifier(HashableValue<'a>),
}Expand description
Swift’s deprecated .accessibility(…) family, as one argument.
Nine overloads sharing a name, distinguished by their argument label. Rust has no argument labels, so the label becomes a variant — which is the same information in the same place.
All nine are @available(…, deprecated) in Swift and the modern spellings
are bound separately: accessibility_label, accessibility_hint and so
on. This exists so a view transcribed from older documentation compiles,
not because it is the way to write new code. SelectionIdentifier is the
exception: it has no modern replacement, so it is only reachable here.
Variants§
Label(&'a str)
.accessibility(label:)
Hint(&'a str)
.accessibility(hint:)
Value(&'a str)
.accessibility(value:)
Hidden(bool)
.accessibility(hidden:)
Identifier(&'a str)
.accessibility(identifier:) — a test hook, not something spoken.
SortPriority(f64)
.accessibility(sortPriority:) — higher is read first.
ActivationPoint(f64, f64)
.accessibility(activationPoint:), in unit coordinates.
InputLabels(&'a [&'a str])
.accessibility(inputLabels:) — what a user may say to activate this.
SelectionIdentifier(HashableValue<'a>)
.accessibility(selectionIdentifier:) — which item of a group this is.