Package-level declarations
Types
Encapsulates a successful outcome with a value of type T.
A discriminated union that encapsulates a successful outcome with a value of DataPayload of type T or a failure with type ErrorPayload.
Marks declarations that are internal in SDK-Hub API, which means that should not be used outside of imahub.sdk.hub
, because their signatures and semantics will change between future releases without any warnings and without providing any migration aids.
Functions
Creates an instance of DataPayload.
Creates an instance of ErrorPayload.
Returns the result of onSuccess for the encapsulated value if this instance represents success or the result of onFailure function for the encapsulated ErrorPayload if it is failure.
Returns the encapsulated value if this instance represents success or the result of onFailure function for the encapsulated ErrorPayload if it is failure.
Returns the encapsulated value if this instance represents success or throws the encapsulated ErrorPayload as Throwable exception if it is failure.
Returns the encapsulated result of the given transform function applied to the encapsulated value if this instance represents success or the original encapsulated ErrorPayload if it is failure.
Performs the given action on the encapsulated ErrorPayload if this instance represents failure. Returns the original HubPayload unchanged.
Performs the given action on the encapsulated value if this instance represents success. Returns the original HubPayload unchanged.