toggle menu
MobileMail
androidJvm
switch theme
search in API
MobileMail
/
com.mobilemail.data.common
/
Result
Result
sealed
class
Result
<
out
T
>
Inheritors
Success
Error
Members
Members & Extensions
Constructors
Result
Link copied to clipboard
protected
constructor
(
)
Types
Error
Link copied to clipboard
data
class
Error
(
val
exception
:
Throwable
)
:
Result
<
Nothing
>
Success
Link copied to clipboard
data
class
Success
<
out
T
>
(
val
data
:
T
)
:
Result
<
T
>
Properties
is
Error
Link copied to clipboard
val
isError
:
Boolean
is
Success
Link copied to clipboard
val
isSuccess
:
Boolean
Functions
flat
Map
Link copied to clipboard
inline
fun
<
R
>
flatMap
(
transform
:
(
T
)
->
Result
<
R
>
)
:
Result
<
R
>
fold
Link copied to clipboard
inline
fun
<
T
,
R
>
Result
<
T
>
.
fold
(
onError
:
(
Throwable
)
->
R
,
onSuccess
:
(
T
)
->
R
)
:
R
get
Or
Else
Link copied to clipboard
inline
fun
<
T
>
Result
<
T
>
.
getOrElse
(
defaultValue
:
(
)
->
T
)
:
T
get
Or
Null
Link copied to clipboard
fun
getOrNull
(
)
:
T
?
get
Or
Throw
Link copied to clipboard
fun
getOrThrow
(
)
:
T
map
Link copied to clipboard
inline
fun
<
R
>
map
(
transform
:
(
T
)
->
R
)
:
Result
<
R
>
map
Error
Link copied to clipboard
inline
fun
<
T
,
R
>
Result
<
T
>
.
mapError
(
transform
:
(
Throwable
)
->
Throwable
)
:
Result
<
R
>
on
Error
Link copied to clipboard
inline
fun
onError
(
action
:
(
Throwable
)
->
Unit
)
:
Result
<
T
>
on
Success
Link copied to clipboard
inline
fun
onSuccess
(
action
:
(
T
)
->
Unit
)
:
Result
<
T
>
to
Exception
Or
Null
Link copied to clipboard
fun
<
T
>
Result
<
T
>
.
toExceptionOrNull
(
)
:
Throwable
?