-
Type: Improvement
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
The Swift driver returns errors when users begin iterating a dead cursor:
for x in cursor { // no errors in here } print(cursor.next()) // LogicError("cannot iterate a dead cursor")
We should consider doing something similar in the Rust driver.
The rationale for doing so is that a user iterating a dead cursor is probably indicative of a programmer error:
- In the "eager" cursor, it could only happen if they're not using a while let loop or if they start iterating after their while let loop ended, both likely errors.
- In the "non-eager" case, it means they're not distinguishing between a cursor being exhausted and returning None, which is also usually an error since it can lead to infinite loops.
- is related to
-
RUST-354 TailableAwait option doesn't seem to work in async driver
- Closed