tapes_client/core/mod.rs
1//! The sealed surface: operations known at build time.
2//!
3//! The tapes read API is a *published contract*, sealed in the tapes repository
4//! and attached to releases as an OpenAPI document. Clients do not build
5//! against the tapes working tree — they build against a published release
6//! asset. This crate vendors that asset once, in `contracts/tapes-api.yaml`,
7//! pinned by fingerprint (see `contracts/PROVENANCE.md`), and turns it into
8//! requests.
9//!
10//! - [`contract`] — the vendored document, reduced to an operation table.
11//! - [`coverage`] — the gate that fails a build when a contract bump adds an
12//! operation the client neither exposes nor deliberately allow-lists.
13//! - [`models`] — the document's response and request shapes as Rust types,
14//! held to it by a gate of their own ([`models::coverage`]).
15//! - [`methods`] — the call surface over a [`crate::transport::TapesTransport`].
16//!
17//! This module is one half of a symmetry: [`crate::cassettes`] is the same
18//! machinery over an operation table discovered at runtime. Both are thin —
19//! everything that could drift between them lives in the shared floor
20//! ([`crate::transport`], [`crate::error`], [`crate::decode`], [`crate::page`],
21//! [`crate::path`]), so a sealed call and a discovered call differ only in
22//! where their operation table came from.
23
24pub mod contract;
25pub mod coverage;
26pub mod methods;
27pub mod models;
28
29pub use contract::{CoreSurface, TAPES_API_YAML, call_for, call_for_with_body, core, ops};
30pub use methods::CoreClient;
31pub use models::ContractModel;