SheetMC Core
Toggle table of contents
0.0.1
jvm
Platform filter
jvm
Switch theme
Search in API
SheetMC Core
SheetMC Core
/
org.sheetmc.core
/
Outcome
Outcome
sealed
interface
Outcome
<
out
T
>
Inheritors
Success
Failure
Members
Members & Extensions
Types
Failure
Link copied to clipboard
data
class
Failure
(
val
message
:
String
,
val
throwable
:
Throwable
?
=
null
)
:
Outcome
<
Nothing
>
Success
Link copied to clipboard
@
JvmInline
value
class
Success
<
T
>
(
val
value
:
T
)
:
Outcome
<
T
>
Properties
failed
Link copied to clipboard
open
val
failed
:
Boolean
succeeded
Link copied to clipboard
abstract
val
succeeded
:
Boolean
Functions
exception
Or
Null
Link copied to clipboard
fun
<
T
>
Outcome
<
T
>
.
exceptionOrNull
(
)
:
Throwable
?
flat
Map
Link copied to clipboard
inline
fun
<
T
,
R
>
Outcome
<
T
>
.
flatMap
(
transform
:
(
T
)
->
Outcome
<
R
>
)
:
Outcome
<
R
>
fold
Link copied to clipboard
inline
fun
<
T
,
R
>
Outcome
<
T
>
.
fold
(
onSuccess
:
(
T
)
->
R
,
onFailure
:
(
String
,
Throwable
?
)
->
R
)
:
R
get
Or
Null
Link copied to clipboard
fun
<
T
>
Outcome
<
T
>
.
getOrNull
(
)
:
T
?
map
Link copied to clipboard
inline
fun
<
T
,
R
>
Outcome
<
T
>
.
map
(
transform
:
(
T
)
->
R
)
:
Outcome
<
R
>
map
Catching
Link copied to clipboard
inline
fun
<
T
,
R
>
Outcome
<
T
>
.
mapCatching
(
transform
:
(
T
)
->
R
)
:
Outcome
<
R
>
map
Failure
Link copied to clipboard
inline
fun
<
T
>
Outcome
<
T
>
.
mapFailure
(
transform
:
(
Outcome.Failure
)
->
Outcome.Failure
)
:
Outcome
<
T
>
recover
Link copied to clipboard
inline
fun
<
T
>
Outcome
<
T
>
.
recover
(
recoverBlock
:
(
Outcome.Failure
)
->
T
)
:
Outcome
<
T
>
recover
Catching
Link copied to clipboard
inline
fun
<
T
>
Outcome
<
T
>
.
recoverCatching
(
recoverBlock
:
(
Outcome.Failure
)
->
T
)
:
Outcome
<
T
>
to
Result
Link copied to clipboard
fun
<
T
>
Outcome
<
T
>
.
toResult
(
)
:
Result
<
T
>