Package-level declarations

Types

Link copied to clipboard
actual typealias Bundle = Bundle

Actual implementation of Bundle for Android - a type alias to android.os.Bundle.

Link copied to clipboard
interface Callback<T, U>

Generic callback interface with a generic return types.

Link copied to clipboard

Generic contract for an executor of Runnable callbacks.

Link copied to clipboard
fun interface Cancellable

Represents a cancellable operation.

Link copied to clipboard
expect abstract class Context

Expect declaration for Context.

Link copied to clipboard
actual typealias Parcel = Parcel

Actual implementation of Parcel for Android - a type alias to android.os.Parcel.

Link copied to clipboard
actual typealias Parcelable = Parcelable

Actual implementation of Parcelable for Android - a type alias to android.os.Parcelable.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
expect annotation class Parcelize

Expect declaration for Parcelize annotation.

Link copied to clipboard
sealed class Result<out SuccessType, out FailureType>

Class that represents either the Success outcome with a value of type SuccessType or Failure with a value of type FailureType.

Link copied to clipboard
actual class TaskHandler

The actual implementation of the TaskHandler class for the Android platform. It uses the Android Handler and Looper to execute tasks asynchronously on the main thread.

expect class TaskHandler

A multiplatform utility for handling tasks asynchronously on different platforms. The TaskHandler class provides a common interface for posting tasks to be executed on different platforms.

Link copied to clipboard
value class UniqueId(val value: Long = nextValue.incrementAndGet())

Thread safe, single process 64 bit unique id. Not to be used if unique multi-process id generation is required.

Link copied to clipboard
actual typealias Uri = Uri

Actual implementation of Uri for Android.

Functions

Link copied to clipboard
inline fun <V, F, V2, F2> Result<V, F>.bimap(successMapper: (V) -> V2, failureMapper: (F) -> F2): Result<V2, F2>

Maps success value or failure.

Link copied to clipboard
inline fun <V, F, V2> Result<V, F>.flatMap(mapper: (V) -> Result<V2, F>): Result<V2, F>

Maps success value to a new Result or passes failure.

Link copied to clipboard
inline fun <V, F, R> Result<V, F>.fold(ifSuccess: (V) -> R, ifFailure: (F) -> R): R

Folds success or failure into a final value.

Link copied to clipboard
inline fun <V, F> Result<V, F>.ifFailure(ifFailure: (F) -> Unit): Result<V, F>

Performs provided operation if Result is failure.

Link copied to clipboard
inline fun <V, F> Result<V, F>.ifSuccess(ifSuccess: (V) -> Unit): Result<V, F>

Performs provided operation if Result is success.

Link copied to clipboard
inline fun <V, F, V2> Result<V, F>.map(mapper: (V) -> V2): Result<V2, F>

Maps success value or passes failure.

Link copied to clipboard
inline fun <V, F, F2> Result<V, F>.mapFailure(mapper: (F) -> F2): Result<V, F2>

Maps failure or passes success value.

Link copied to clipboard
inline fun <V, F> Result<V, F>.valueOr(handler: (F) -> V): V

Returns success value or uses handler to map failure to value.