Initializerswift 6.0.3FoundationInternationalization
init(_:order:)
- iOS
- 16.4+
- macOS
- 13.3+
- tvOS
- 16.4+
- watchOS
- 9.4+
init<Value>(_ keyPath: any KeyPath<Compared, Value?> & Sendable, order: SortOrder = .forward) where Value : Comparable
init<Value>(_ keyPath: any KeyPath<Compared, Value?> & Sendable, order: SortOrder = .forward) where Value : Comparable
s30FoundationInternationalization14SortDescriptorV_5orderACyxGs8Sendable_s7KeyPathCyxqd__SgGXc_0A10Essentials0C5OrderOtcSLRd__lufc
What are these?12Z2E
import FoundationInternationalization
struct SortDescriptor<Compared>
A serializable description of how to sort numeric and String
types.
class KeyPath<Root, Value>
A key path from a specific root type to a specific resulting value type.
protocol Sendable
@frozen enum SortOrder
The orderings that sorts can be performed with.
protocol Comparable : Equatable
A type that can be compared using the relational operators <
, <=
, >=
, and >
.
init(_ keyPath: any KeyPath<Compared, String> & Sendable, comparator: String.StandardComparator)
Temporarily available as a replacement for init(_:comparator:)
with a default argument.
init(_ keyPath: any KeyPath<Compared, String?> & Sendable, comparator: String.StandardComparator)
Temporarily available as a replacement for init(_:comparator:)
with a default argument.
init(_ keyPath: any KeyPath<Compared, String> & Sendable, comparator: String.StandardComparator, order: SortOrder)
Temporarily available as a replacement for init(_:comparator:)
with a default argument.
init(_ keyPath: any KeyPath<Compared, String?> & Sendable, comparator: String.StandardComparator, order: SortOrder)
Temporarily available as a replacement for init(_:comparator:)
with a default argument.
init<Value>(_ keyPath: any KeyPath<Compared, Value> & Sendable, order: SortOrder = .forward) where Value : Comparable
init(from decoder: any Decoder) throws
var keyPath: PartialKeyPath<Compared>? { get }
The key path to the field for comparison.
var order: SortOrder
Sort order.
var stringComparator: String.StandardComparator? { get }
A String.StandardComparator
value.
func compare(_ lhs: Compared, _ rhs: Compared) -> ComparisonResult
func hash(into hasher: inout Hasher)