concurrency v3.1.0 (2021-08-24T13:51:28Z)
Dub
Repo
Result
concurrency
Undocumented in source.
struct
Result (
T
) {
import
mir
.
algebraic
:
Algebraic
,
Nullable
;
;
struct
Value
(T)
;
static if
(
is(T == void)
)
Nullable
!(
Cancelled
,
Exception
)
result
;
static if
(!(
is(T == void)
))
Algebraic
!(
Value
!
T
,
Cancelled
,
Exception
)
result
;
this
(T v);
this
(Cancelled c);
this
(Exception e);
bool
isCancelled
();
bool
isError
();
bool
isOk
();
static if
(
!is(T == void)
)
T
value
();
Exception
error
();
void
assumeOk
();
}
Constructors
this
this
(T v)
Undocumented in source.
this
this
(Cancelled c)
Undocumented in source.
this
this
(Exception e)
Undocumented in source.
Members
Functions
assumeOk
void
assumeOk
()
Undocumented in source. Be warned that the author may not have intended to support it.
error
Exception
error
()
Undocumented in source. Be warned that the author may not have intended to support it.
isCancelled
bool
isCancelled
()
Undocumented in source. Be warned that the author may not have intended to support it.
isError
bool
isError
()
Undocumented in source. Be warned that the author may not have intended to support it.
isOk
bool
isOk
()
Undocumented in source. Be warned that the author may not have intended to support it.
value
T
value
()
Undocumented in source. Be warned that the author may not have intended to support it.
Structs
Value
struct
Value
(T)
Undocumented in source.
Variables
result
Nullable
!(
Cancelled
,
Exception
)
result
;
Undocumented in source.
result
Algebraic
!(
Value
!
T
,
Cancelled
,
Exception
)
result
;
Undocumented in source.
Meta
Source
See Implementation
concurrency
modules
bitfield
executor
fork
nursery
operations
receiver
scheduler
sender
signal
slist
stoptoken
stream
thread
timer
timingwheels
utils
functions
isMainThread
syncWait
syncWaitImpl
sync_wait
sync_wait_impl
static variables
cancelledException
structs
Cancelled
Result
SyncWaitReceiver2
templates
match