AutocompleteResult

sealed interface AutocompleteResult<out T>

Represents the result of a autocomplete operation.

Inheritors

Types

Link copied to clipboard

Represents a unsuccessful autocomplete operation.

Link copied to clipboard
class Failed(val message: String) : AutocompleteResult.Error

Geocoding operation failed at some point while autocomplete.

Link copied to clipboard

Geocoding operation failed because the device does not support autocomplete, or the device does not support the specific autocomplete operation.

Link copied to clipboard
class Success<T>(val data: List<T>) : AutocompleteResult<T>

Represents a successful autocomplete operation.

Properties

Link copied to clipboard
open val isError: Boolean

Check if the result was unsuccessful.

Functions

Link copied to clipboard

Get the error or null if the result was successful.

Link copied to clipboard
open fun getOrNull(): List<T>?

Get the result list data or null if the result was unsuccessful.

Link copied to clipboard

Perform an action if the result was unsuccessful.

Link copied to clipboard
open fun onSuccess(block: (List<T>) -> Unit): AutocompleteResult<T>

Perform an action if the result was successful.