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

wboayue / rust-ibapi / 25635571801
92%

Build:
DEFAULT BRANCH: main
Ran 10 May 2026 05:51PM UTC
Jobs 1
Files 127
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

10 May 2026 05:49PM UTC coverage: 89.645% (+0.05%) from 89.593%
25635571801

push

github

web-flow
contracts: forbid bare Contract { ... } construction (#548)

* contracts: forbid bare Contract { ... } construction

Adds #[non_exhaustive] to pub struct Contract so external crates must
build it through the typed entry points (Contract::stock/call/put/
futures/forex/crypto/index/bond_*/spread) or the field-minimal
ContractBuilder::new() escape hatch.

Changes
-------
- pub struct Contract is #[non_exhaustive]. Inline doc-comment carries a
  compile_fail example that exercises the lockdown directly — guards
  against future removal of the attribute since cargo build --examples
  alone wouldn't catch it.
- Revives ContractBuilder (was commented out when typed builders shipped):
  modernizes build() for typed Symbol/Exchange/Currency wrappers, adds
  the missing last_trade_date setter so every pub field on Contract has
  a corresponding setter — escape-hatch parity invariant from
  plans/v3-api-ergonomics.md §1.
- Re-exports ContractBuilder at ibapi::contracts::ContractBuilder.
- Adds setter_parity_with_contract_fields regression test: builds a
  Contract via ContractBuilder, then exhaustively destructures every
  field. New Contract fields landed without a setter break this at
  compile time.
- Adds PartialEq<str> / PartialEq<&str> (both directions) for Symbol,
  Exchange, Currency — mirrors std String ergonomics, lets users write
  contract.symbol == "AAPL" without .as_str().
- Migration guide: new section §8 documents the lockdown and escape-hatch
  invariant; highlights bullet added.

Verification
------------
- cargo fmt
- cargo clippy --all-targets -- -D warnings (default + sync + all-features)
- RUSTDOCFLAGS=-D warnings cargo doc --no-deps (default + sync + all-features)
- just test — 112 passed, 0 failed (was 100 pre-PR; added parity, types,
  doc-tests on revived ContractBuilder)
- cargo build --examples (default + sync)
- cargo build -p ibapi-integration-{sync,async} --tests

* contracts: /simplify pass — collapse PartialEq impls into a macro
... (continued)

21 of 21 new or added lines in 2 files covered. (100.0%)

18448 of 20579 relevant lines covered (89.64%)

25.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25635571801.1 10 May 2026 05:51PM UTC 127
89.64
GitHub Action Run
Source Files on build 25635571801
  • Tree
  • List 127
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25635571801
  • 0545b833 on github
  • Prev Build on main (#25633475431)
  • Next Build on main (#25635635069)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc