Effect outcome conversion
fromExitvariable
Converts an Effect Exit to Success or Failure without losing its Cause.
fromResultvariable
Converts an Effect Result to Success or a typed Failure Cause.
Failure transformations
mapErrorvariable
Maps typed failures inside the base Cause while preserving defects, interruption, progress, and optimistic history.
Optimistic transitions
optimisticvariable
Adds an optimistic value above an existing AsyncData history.
Pattern matching
matchvariable
Exhaustively folds every AsyncData variant, in data-first or data-last form.
Refresh transitions
startLoadingvariable
Starts loading while preserving successful, failed, and optimistic history.
stopLoadingvariable
Stops loading or refreshing without discarding optimistic history.
Runtime validation
isAsyncDatavariable
Validates the runtime structure of an unknown AsyncData value.
State construction
State extraction
getCausefunction
Returns the complete Cause only when the current state is a Failure.
getErrorfunction
Returns the first typed failure found in a Failure Cause.
getSuccessfunction
Returns the current successful or optimistic value as an Effect
Option.
State inspection
isFailurevariable
Tests whether an AsyncData value contains an Effect Cause.
isLoadingvariable
Tests whether an AsyncData value is loading without a prior result.
isNoDatavariable
Tests whether an AsyncData value is
NoData.isOptimisticvariable
Tests whether an AsyncData value is an optimistic history node.
isPendingvariable
Tests whether the base state is loading or refreshing through optimistic history.
isRefreshingvariable
Tests whether a success or failure carries active refresh progress.
isSuccessvariable
Tests whether an AsyncData value contains a successful value.
State models
AsyncDatatype-alias
The complete renderer-independent state machine for asynchronous data.
Failureinterface
Represents an Effect failure, optionally while a retry refreshes it.
Loadinginterface
Represents active work that has not produced a prior value or failure.
NoDatainterface
Represents an asynchronous value before work or a result exists.
Optimisticinterface
Represents an optimistic value together with the exact state it replaced.
Progressinterface
Reports completed work and, when known, the total amount of work.
Refreshingtype-alias
A success or failure that retains progress for an active refresh.
Successinterface
Represents a successfully produced value, optionally while it refreshes.