HistoryRecord
public struct HistoryRecord : IndexableRecord, SearchResult, Codable, Hashable
Resolved search result intended to represent user search history
-
“history icon” by default
Declaration
Swift
public var iconName: String? -
Type of stored history record
See moreDeclaration
Swift
public enum HistoryType : Int, Codable -
Unique identifier
Declaration
Swift
public private(set) var id: String { get } -
Record’s name
Declaration
Swift
public private(set) var name: String { get } -
Address formatted with medium style
Declaration
Swift
public var descriptionText: String? { get } -
Coordinate associated with the record
Declaration
Swift
public internal(set) var coordinate: CLLocationCoordinate2D { get set } -
The time when the record was created.
Declaration
Swift
public private(set) var timestamp: Date { get } -
Type of object used to make a history record, e.g. result or query
Declaration
Swift
public private(set) var historyType: HistoryType { get } -
Original result type of object, e.g. address or POI
Declaration
Swift
public private(set) var type: SearchResultType { get } -
FavoriteRecord Always has estimatedTime as nil.
Declaration
Swift
public var estimatedTime: Measurement<UnitDuration>? -
Associated metadata at creating time if available.
Declaration
Swift
public var metadata: SearchResultMetadata? -
Address components of specific record
Declaration
Swift
public var address: Address? -
Additional indexable tokens for search engine
SearchEngine would track that tokens to match results
Declaration
Swift
public var additionalTokens: Set<String>? -
Categories associated with original result
Declaration
Swift
public var categories: [String]? -
Coordinates of building entries
Declaration
Swift
public var routablePoints: [RoutablePoint]? -
History record constructor
Declaration
Swift
public init(id: String = UUID().uuidString, name: String, coordinate: CLLocationCoordinate2D, timestamp: Date = Date(), historyType: HistoryRecord.HistoryType, type: SearchResultType, address: Address?, metadata: SearchResultMetadata? = nil, categories: [String]? = nil, routablePoints: [RoutablePoint]? = nil)Parameters
idUUID used by default
nameHistory name
coordinateHistory coordinate
timestampHistory timestamp
historyTypeHistory type
typeHistory type
addressHistory address
metadataAssociated metadata
categoriesCategories of original object
routablePointsCoordinates of building entries
-
Construct
HistoryRecordbased on concreteSearchResultDeclaration
Swift
public init(historyType: HistoryRecord.HistoryType = .result, searchResult: SearchResult, timestamp: Date = Date())Parameters
historyTypeType of history result
searchResultPrototype result
timestampcreating timestamp. Calling time by default
HistoryRecord Structure Reference