transf<R extends Object> method
Transforms the Outcome's generic type from T
to R
.
Uses the transformer function noFutures
if provided, otherwise
attempts a direct cast.
Implementation
@override
Sync<R> transf<R extends Object>([@noFutures R Function(T e)? noFutures]) {
return Sync(() {
final okOrErr = value.transf<R>(noFutures);
if (okOrErr.isErr()) {
throw okOrErr;
}
return okOrErr.unwrap();
});
}