StructuredSearchState
public struct StructuredSearchState : Equatable
Represents current state of StructuredSearchSession
during the structured (hierarchical) search.
StructuredSearchState
is provided by the search session until the search doesn’t reach the destination.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates a new
StructuredSearchState
instance with the given parameters.Declaration
Swift
public init(selectedCandidates: [StructuredSearchCandidate], availableCandidates: [StructuredSearchCandidate])
Parameters
selectedCandidates
defines the previous search choices in the current search session.
availableCandidates
defines possible options to proceed with the search.
Important
shouldn’t be used outside the TomTom SDK to supply structured search input.
-
The previous selected list of
StructuredSearchCandidate
and the clients might use this to display selection on each address level.Declaration
Swift
public let selectedCandidates: [StructuredSearchCandidate]
-
The available list of
StructuredSearchCandidate
for the address level. The clients are expected to select a candidate viaStructuredSearchSession.selectCandidate
to proceed to next step.Declaration
Swift
public let availableCandidates: [StructuredSearchCandidate]