from

open fun <T, E : PushwooshException?> from(data: T, exception: E): Result<T, E>

Creates a result with both data and exception fields.

This factory method constructs a Result instance that may contain either data, exception, or both. It provides flexibility for edge cases where both values might be present.

Note: This is an internal SDK method. Application developers typically don't need to create Result instances directly as they are provided by SDK callback methods.

Return

a Result instance with the given data and exception

Parameters

data

the success data (may be null)

exception

the failure exception (may be null)

<T>

the type of success data

<E>

the type of exception