ZIO<R, E, A>.future constructor
ZIO<R, E, A>.future (
- FutureOr<
A> f()
Creates a ZIO from a Future.
This can be unsafe because it will throw an error if the future fails.
Implementation
factory ZIO.future(FutureOr<A> Function() f) => ZIO.from(
(ctx) => fromThrowable(
f,
onError: (e, s) => Defect(e, s),
),
);