• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wboayue / rust-ibapi / 25323281489
92%

Build:
DEFAULT BRANCH: main
Ran 04 May 2026 01:59PM UTC
Jobs 1
Files 123
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 May 2026 01:58PM UTC coverage: 87.529% (-0.1%) from 87.64%
25323281489

push

github

web-flow
feat(subscriptions): widen Subscription<T> public API to SubscriptionItem<T> (closes #487) (#504)

* feat(subscriptions): widen Subscription<T> public API to SubscriptionItem<T>

Public API change (closes #487):

  Sync  next/try_next/next_timeout: Option<T>          -> Option<Result<SubscriptionItem<T>, Error>>
  Async next                       : Option<Result<T, Error>> -> Option<Result<SubscriptionItem<T>, Error>>

* New public type `SubscriptionItem<T> = Data(T) | Notice(Notice)`
  exposed at `ibapi::subscriptions::SubscriptionItem`.
* Sync drops `error()` accessor and the internal `Mutex<Option<Error>>`
  field; errors flow via the `Err` arm of every yielding method.
* New iterator adapters `iter_data` / `try_iter_data` / `timeout_iter_data`
  on sync and `next_data` on both sync + async filter notices and yield
  `Result<T, Error>` for callers that only care about data.
* Existing `iter` / `try_iter` / `timeout_iter` widen to yield
  `Result<SubscriptionItem<T>, Error>`; `IntoIterator` impls match.

Notice arm is structurally present but unreachable until PR 3 emits notices
from the dispatcher.

* refactor(consumers): migrate to SubscriptionItem-aware API

Consumer-side sweep for the widened `Subscription<T>` API:

* Library tests, integration tests, examples, and doc tests now use
  `next_data()` / `iter_data()` (filtering notices to keep legacy-shape
  return) where they previously expected `T` directly.
* Dropped all `subscription.error()` callers — errors flow via `Err` arm
  of `next_data()` / `iter_data()` items.
* Restructured `examples/sync/stream_retry.rs` retry loop with a labeled
  loop so `Err(Error::ConnectionReset)` from the iterator can `continue`
  the outer retry.
* Restructured `examples/sync/bracket_order.rs` to use
  `subscription.try_iter_data().next()` for mutable counter access.
* Doc tests on `accounts`, `client`, `historical`, `realtime`, `news`,
  `orders`, `scanner` rewritten to demonstrate the new shape.

* chore: dr... (continued)

48 of 79 new or added lines in 6 files covered. (60.76%)

4 existing lines in 1 file now uncovered.

16978 of 19397 relevant lines covered (87.53%)

26.25 hits per line

Uncovered Changes

Lines Coverage ∆ File
18
63.98
-7.15% src/subscriptions/sync.rs
5
95.45
-2.29% src/subscriptions/async.rs
5
90.38
-9.62% src/subscriptions/common.rs
2
0.0
0.0% src/orders/builder/sync_impl.rs
1
0.0
0.0% src/orders/builder/async_impl.rs

Coverage Regressions

Lines Coverage ∆ File
4
63.98
-7.15% src/subscriptions/sync.rs
Jobs
ID Job ID Ran Files Coverage
1 25323281489.1 04 May 2026 01:59PM UTC 123
87.53
GitHub Action Run
Source Files on build 25323281489
  • Tree
  • List 123
  • Changed 15
  • Source Changed 15
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25323281489
  • 5cf9f087 on github
  • Prev Build on main (#25302199183)
  • Next Build on main (#25323850850)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc