ZIO<R, E, A>.from constructor
ZIO<R, E, A>.from (
- FutureOr<
Exit< run(E, A> >- ZIOContext<
R> ctx
- ZIOContext<
Creates a ZIO from a function that takes a ZIOContext and returns a FutureOr of Exit
Implementation
factory ZIO.from(FutureOr<Exit<E, A>> Function(ZIOContext<R> ctx) run) {
StackTrace? stackTrace = debugTracing ? StackTrace.current : null;
assert(() {
stackTrace ??= StackTrace.current;
return true;
}());
return ZIO._(run, stackTrace: stackTrace);
}