Skip to content

docs: align v1 public API docs and examples - #44

Merged
justin13888 merged 1 commit into
masterfrom
docs/finalize-v1-api-surface
Jun 10, 2026
Merged

justin13888 merged 1 commit into
masterfrom
docs/finalize-v1-api-surface

Conversation

@justin13888

Copy link
Copy Markdown
Collaborator

Context

Finalization pass over the v1.2.0 public API surface. An audit found the surface to be structurally sound (uniform Result<f64> returns, shared Error, consistent (reference, distorted, opts) order, sealed format traits, #![deny(missing_docs)]), with a few documentation/example drift items that contradict the "finalized v1" narrative. No public signatures change.

Changes

  • README version pins — iqa = { version = "0.1", ... } → "1.2" in all three install snippets (these predated the 1.0 release).
  • Broken intra-doc links — [module docs](self) in src/ms_ssim.rs and src/iw_ssim.rs pointed at private modules: they warned under cargo doc and were unreachable on docs.rs. Replaced with an inline scale-count sentence so the explanation survives in the rendered function docs.
  • Full metric coverage — the README quick-start and examples/compare.rs showed only 5 of 9 metrics. Added MS-SSIM, IW-SSIM, PSNR-HVS-M, and CIEDE2000, updated the example's required-features in Cargo.toml, and widened the example's print column to fit the longer labels.

Known, intentionally-unchanged discrepancy

ciede2000(ref, dist, _opts: Ciede2000Options) takes an empty options struct while ssimulacra2(ref, dist) takes none — the one global inconsistency. Reconciling either way is a semver-major change, so it is deliberately left for a future 2.0.

Verification

  • cargo doc (all metrics + vendored-lcms2): no warnings.
  • cargo build --example compare with all 9 metrics: compiles.
  • cargo test --doc: all doctests pass (including the compile_fail type-safety demos).

Finalization pass over the v1.2.0 public surface (no signature changes):

- README: fix stale `version = "0.1"` install pins (3x) to "1.2".
- ms_ssim/iw_ssim: replace broken `[module docs](self)` intra-doc links
  (private modules — warned under `cargo doc` and unreachable on docs.rs)
  with an inline scale-count note.
- examples/compare + README quick-start: show all 9 metrics (add MS-SSIM,
  IW-SSIM, PSNR-HVS-M, CIEDE2000); widen the example's print column.
@justin13888
justin13888 merged commit 583e652 into master Jun 10, 2026
4 checks passed
@justin13888
justin13888 deleted the docs/finalize-v1-api-surface branch June 10, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant