Skip to content

Protocol

SortComparator

iOS 15.0+ iPadOS 15.0+ Mac Catalyst 15.0+ macOS 12.0+ tvOS 15.0+ watchOS 8.0+
A comparison algorithm for a specified type.
@preconcurrency protocol SortComparator<Compared> : Hashable, Sendable

Overview

Objects that conform to SortComparator provide a comparison algorithm and storage for the sort order to use when comparing.

Topics

Associated Types

Instance Properties

Instance Methods

Relationships

Inherits From

  • Swift.Equatable
  • Swift.Hashable
  • Swift.Sendable
  • Swift.SendableMetatype

Conforming Types