MutationObject

sealed interface MutationObject<out T, S> : MutationModel<T>

A MutationObject represents MutationModels interface for mutating data.

Parameters

T

Type of the return value from the mutation.

S

Type of the variable to be mutated.

Inheritors

Properties

Link copied to clipboard
abstract val data: T?

The return value from the data source. (Backward compatibility with MutationModel)

Link copied to clipboard
abstract val error: Throwable?
Link copied to clipboard
abstract val errorUpdatedAt: Long
Link copied to clipboard
open val isFailure: Boolean
Link copied to clipboard
open val isIdle: Boolean
Link copied to clipboard
open val isMutated: Boolean
Link copied to clipboard
open val isPending: Boolean
Link copied to clipboard
open val isSuccess: Boolean
Link copied to clipboard
abstract val mutate: suspend (variable: S) -> T

Mutates the variable.

Link copied to clipboard
abstract val mutateAsync: suspend (variable: S) -> Unit

Mutates the variable asynchronously.

Link copied to clipboard
abstract val mutatedCount: Int
Link copied to clipboard
abstract val reply: Reply<T>
Link copied to clipboard
abstract val replyUpdatedAt: Long
Link copied to clipboard
abstract val reset: suspend () -> Unit

Resets the mutation state.

Link copied to clipboard
open val revision: String
Link copied to clipboard
abstract val status: MutationStatus
Link copied to clipboard
open val submittedAt: Long

Functions

Link copied to clipboard
open override fun isAwaited(): Boolean