Hashes the essential components of this value by feeding them into the
given hasher.
Implement this method to conform to the Hashable protocol. The
components used for hashing must be the same as the components compared
in your type’s == operator implementation. Call hasher.combine(_:)
with each of these components.
Important
In your implementation of hash(into:),
don’t call finalize() on the hasher instance provided,
or replace it with a different instance.
Doing so may become a compile-time error in the future.
Hash values are not guaranteed to be equal across different executions of
your program. Do not save hash values to use during a future execution.
Important
hashValue is deprecated as a Hashable requirement. To
conform to Hashable, implement the hash(into:) requirement instead.
The compiler provides an implementation for hashValue for you.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eRankPreference\u003c/code\u003e is an enum used to specify how results are ranked in a Google Places Search by Text request.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two ranking options: \u003ccode\u003erelevance\u003c/code\u003e (default) and \u003ccode\u003edistance\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRankPreference\u003c/code\u003e conforms to \u003ccode\u003eCaseIterable\u003c/code\u003e, \u003ccode\u003eEquatable\u003c/code\u003e, \u003ccode\u003eHashable\u003c/code\u003e, and \u003ccode\u003eIdentifiable\u003c/code\u003e protocols, enabling various functionalities like iterating through all cases and comparing instances.\u003c/p\u003e\n"],["\u003cp\u003eWhen choosing \u003ccode\u003edistance\u003c/code\u003e, the request must include the user's location to rank results based on proximity.\u003c/p\u003e\n"]]],[],null,["# GooglePlacesSwift Framework Reference\n\nRankPreference\n==============\n\n enum RankPreference\n\n extension ../../Structs/SearchByTextRequest.html.RankPreference : CaseIterable, Equatable, Hashable, Identifiable, Sendable\n\nHow results will be ranked in the response.\n- `\n ``\n ``\n `\n\n ### [==(_:_:)](#/s:17GooglePlacesSwift19SearchByTextRequestV14RankPreferenceO2eeoiySbAE_AEtFZ)\n\n `\n ` \n Returns a Boolean value indicating whether two values are equal.\n\n Equality is the inverse of inequality. For any values `a` and `b`,\n `a == b` implies that `a != b` is `false`. \n\n #### Declaration\n\n Swift \n\n static func == (a: ../../Structs/SearchByTextRequest.html.RankPreference, b: ../../Structs/SearchByTextRequest.html.RankPreference) -\u003e Bool\n\n- `\n ``\n ``\n `\n\n ### [AllCases](#/s:17GooglePlacesSwift19SearchByTextRequestV14RankPreferenceO8AllCasesa)\n\n `\n ` \n A type that can represent a collection of all values of this type. \n\n #### Declaration\n\n Swift \n\n typealias AllCases = [../../Structs/SearchByTextRequest.html.RankPreference]\n\n- `\n ``\n ``\n `\n\n ### [ID](#/s:17GooglePlacesSwift19SearchByTextRequestV14RankPreferenceO2IDa)\n\n `\n ` \n A type representing the stable identity of the entity associated with\n an instance. \n\n #### Declaration\n\n Swift \n\n @available(watchOS, introduced: 6.0)\n @available(macOS, introduced: 10.15)\n @available(iOS, introduced: 13.0)\n @available(tvOS, introduced: 13.0)\n typealias ID = ../../Structs/SearchByTextRequest.html.RankPreference\n\n- `\n ``\n ``\n `\n\n ### [allCases](#/s:17GooglePlacesSwift19SearchByTextRequestV14RankPreferenceO8allCasesSayAEGvpZ)\n\n `\n ` \n A collection of all values of this type. \n\n #### Declaration\n\n Swift \n\n nonisolated static var allCases: [../../Structs/SearchByTextRequest.html.RankPreference] { get }\n\n- `\n ``\n ``\n `\n\n ### [distance](#/s:17GooglePlacesSwift19SearchByTextRequestV14RankPreferenceO8distanceyA2EmF)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n case distance\n\n- `\n ``\n ``\n `\n\n ### [hash(into:)](#/s:17GooglePlacesSwift19SearchByTextRequestV14RankPreferenceO4hash4intoys6HasherVz_tF)\n\n `\n ` \n Hashes the essential components of this value by feeding them into the\n given hasher.\n\n Implement this method to conform to the `Hashable` protocol. The\n components used for hashing must be the same as the components compared\n in your type's `==` operator implementation. Call `hasher.combine(_:)`\n with each of these components. \n Important\n\n In your implementation of `hash(into:)`,\n don't call `finalize()` on the `hasher` instance provided,\n or replace it with a different instance.\n Doing so may become a compile-time error in the future. \n\n #### Declaration\n\n Swift \n\n func hash(into hasher: inout Hasher)\n\n- `\n ``\n ``\n `\n\n ### [hashValue](#/s:17GooglePlacesSwift19SearchByTextRequestV14RankPreferenceO9hashValueSivp)\n\n `\n ` \n The hash value.\n\n Hash values are not guaranteed to be equal across different executions of\n your program. Do not save hash values to use during a future execution. \n Important\n `hashValue` is deprecated as a `Hashable` requirement. To conform to `Hashable`, implement the [hash(into:)](../../Structs/SearchByTextRequest/RankPreference.html#/s:17GooglePlacesSwift19SearchByTextRequestV14RankPreferenceO4hash4intoys6HasherVz_tF) requirement instead. The compiler provides an implementation for `hashValue` for you. \n\n #### Declaration\n\n Swift \n\n var hashValue: Int { get }\n\n- `\n ``\n ``\n `\n\n ### [id](#/s:17GooglePlacesSwift19SearchByTextRequestV14RankPreferenceO2idAEvp)\n\n `\n ` \n The stable identity of the entity associated with this instance. \n\n #### Declaration\n\n Swift \n\n var id: ../../Structs/SearchByTextRequest.html.RankPreference { get }\n\n- `\n ``\n ``\n `\n\n ### [relevance](#/s:17GooglePlacesSwift19SearchByTextRequestV14RankPreferenceO9relevanceyA2EmF)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n case relevance"]]