toggle menu
Storyteller SDK Documentation
11.2.0-local-master-c0ea6738e
switch theme
search in API
Storyteller SDK Documentation
/
com.storyteller.remote.common.result
/
OperationResult
/
Success
Success
@
Serializable
data
class
Success
<
out
T
>
(
val
value
:
T
)
:
OperationResult
<
T
>
Members
Constructors
Success
Link copied to clipboard
constructor
(
value
:
T
)
Properties
value
Link copied to clipboard
val
value
:
T
Functions
exception
Or
Null
Link copied to clipboard
fun
exceptionOrNull
(
)
:
Throwable
?
flat
Map
Link copied to clipboard
inline
fun
<
R
>
flatMap
(
transform
:
(
value
:
T
)
->
OperationResult
<
R
>
)
:
OperationResult
<
R
>
fold
Link copied to clipboard
inline
fun
<
R
>
fold
(
onSuccess
:
(
value
:
T
)
->
R
,
onFailure
:
(
exception
:
Throwable
)
->
R
)
:
R
get
Or
Default
Link copied to clipboard
inline
fun
getOrDefault
(
defaultValue
:
T
)
:
T
get
Or
Else
Link copied to clipboard
inline
fun
getOrElse
(
onFailure
:
(
exception
:
Throwable
)
->
T
)
:
T
get
Or
Null
Link copied to clipboard
fun
getOrNull
(
)
:
T
?
get
Or
Throw
Link copied to clipboard
fun
getOrThrow
(
)
:
T
is
Failure
Link copied to clipboard
fun
isFailure
(
)
:
Boolean
is
Success
Link copied to clipboard
fun
isSuccess
(
)
:
Boolean
map
Link copied to clipboard
inline
fun
<
R
>
map
(
transform
:
(
value
:
T
)
->
R
)
:
OperationResult
<
R
>
on
Failure
Link copied to clipboard
inline
fun
onFailure
(
action
:
(
exception
:
Throwable
)
->
Unit
)
:
OperationResult
<
T
>
on
Success
Link copied to clipboard
inline
fun
onSuccess
(
action
:
(
value
:
T
)
->
Unit
)
:
OperationResult
<
T
>
recover
Link copied to clipboard
inline
fun
recover
(
transform
:
(
exception
:
Throwable
)
->
T
)
:
OperationResult
<
T
>
recover
Catching
Link copied to clipboard
inline
fun
recoverCatching
(
transform
:
(
exception
:
Throwable
)
->
T
)
:
OperationResult
<
T
>