toggle menu
MobileMail
androidJvm
switch theme
search in API
MobileMail
/
com.mobilemail.data.common
/
Result
/
Error
Error
data
class
Error
(
val
exception
:
Throwable
)
:
Result
<
Nothing
>
Members
Members & Extensions
Constructors
Error
Link copied to clipboard
constructor
(
exception
:
Throwable
)
Properties
exception
Link copied to clipboard
val
exception
:
Throwable
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
:
(
Nothing
)
->
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
(
)
:
Nothing
?
get
Or
Throw
Link copied to clipboard
fun
getOrThrow
(
)
:
Nothing
map
Link copied to clipboard
inline
fun
<
R
>
map
(
transform
:
(
Nothing
)
->
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
<
Nothing
>
on
Success
Link copied to clipboard
inline
fun
onSuccess
(
action
:
(
Nothing
)
->
Unit
)
:
Result
<
Nothing
>
to
Exception
Or
Null
Link copied to clipboard
fun
<
T
>
Result
<
T
>
.
toExceptionOrNull
(
)
:
Throwable
?