bynk.within.timed_out_not_in_scope
Error e.within(d) yields Result[_, TimedOut], but the unit does not consume bynk, so TimedOut is not in scope.
within returns Result[_, TimedOut], and TimedOut is declared in bynk, so a unit that wants within has to consume it. Without that the result type names a type the unit cannot see. Add consumes bynk { TimedOut } to the unit, or add TimedOut to its existing consumes bynk { … } list.
Example
let r <- Pricing.quote(id).within(2.seconds) // ✗ `TimedOut` is not in scope
consumes bynk { TimedOut } // ✓ in the unit's headerlet r <- Pricing.quote(id).within(2.seconds)In the Book
See also
- The grammar rule it governs:
method_call. - Every code in its category, Other, on the diagnostic index.
bynk explain bynk.within.timed_out_not_in_scopeshows the same from the installed toolchain, without a network.