AutocompleteSegment
public enum AutocompleteSegmentAutocompleteSegment represents an entity found within the autocomplete search term.
An entity can be a brand, a point of interest (POI) category, or plain text. Every case has a corresponding associated object.
This enum is used in AutocompleteResult to describe the matched entities returned from the autocomplete search.
An example of handling segments:
let options = AutocompleteOptions(
    query: "mar",
    position: .AMSTERDAM,
    radius: Measurement(value: 100, unit: .kilometers),
    countries: ["NL"]
)
search.autocomplete(options: options) { result in
    if case let .success(response) = result {
        response.results.forEach { result in
            result.segments.forEach { segment in
                switch segment {
                case .brand(let brand):
                    print("Brand: \(brand.brand.name)")
                case .poiCategory(let category):
                    print("Category: \(category.poiCategory.name)")
                case .plainText(let text):
                    print("Text: \(text.plainText)")
                @unknown default:
                    print("unknown")
                }
            }
        }
    }
}
 // Prints:
 //   Category: Market
 //   Brand: Marqt
 //   Category: Marina
 //   Brand: Marriott
- 
                  
                  Represents a matched brand entity. For example the query “BM” can return an autocomplete search result with the brand segment and the brand “BMW”. DeclarationSwift case brand(AutocompleteSegmentBrand)
- 
                  
                  Represents a matched POI category entity. For example, the query “Air” can return an autocomplete search result with the category segment and the category “Airport”. DeclarationSwift case poiCategory(AutocompleteSegmentPOICategory)
- 
                  
                  Represents a matched plain text entity. For example the query “Qwe” cannot be recognized as a brand or a category, so it can return an autocomplete search result with the plain text segment and the query “Qwe”. DeclarationSwift case plainText(AutocompleteSegmentPlainText)
 
         TomTom SDK for iOS (0.53.1)
 
          TomTom SDK for iOS (0.53.1)
         AutocompleteSegment
          AutocompleteSegment