cow-rs 0.1.1

Rust SDK for the CoW Protocol: quoting, signing, posting and tracking orders, plus composable orders, on-chain reads and subgraph queries.
Documentation
//! Spec-faithful mirror of the `CoW` Protocol orderbook `OpenAPI` document.
//!
//! **Do not edit this file manually.** The contents of `inner` are generated
//! by [`progenitor`](https://crates.io/crates/progenitor) from
//! `specs/orderbook-api.yml` via `build.rs`.
//!
//! # Role
//!
//! This module is an **internal** compile-time mirror of the upstream API
//! spec. Two things make it valuable even though neither `super::api` nor any
//! other part of the crate calls into the generated HTTP [`inner::Client`]:
//!
//! 1. **Build-time spec validation.** If the upstream `OpenAPI` document drifts in a way
//!    `progenitor` cannot model, the crate fails to build.
//! 2. **Wire-format drift detection.** The `wire_compat` test module at
//!    `src/order_book/wire_compat.rs` round-trips instances of the hand-written [`super::types`]
//!    through the generated `inner::types` via `serde_json`. Any breaking schema change upstream —
//!    a renamed field, a type flip, a new required property — turns those tests red.
//!
//! The generated HTTP client (`inner::Client`) is not used at runtime; the
//! public [`super::api::OrderBookApi`] is a hand-written `reqwest` wrapper
//! that exposes the richer domain types in [`super::types`] (backed by
//! `alloy_primitives::Address`, typed enums, etc.). Rebranching
//! `OrderBookApi` onto `inner::Client` would be a semver-breaking refactor
//! and is tracked separately.
//!
//! Visibility is `pub(crate)` — external consumers should never depend on
//! these types directly; use [`super::types`].

pub(crate) mod inner {
    #![allow(
        clippy::all,
        clippy::pedantic,
        clippy::nursery,
        clippy::restriction,
        dead_code,
        missing_docs,
        unnameable_types,
        unreachable_pub,
        unused_qualifications,
        elided_lifetimes_in_paths,
        redundant_imports,
        rustdoc::all,
        reason = "progenitor emits `pub` items inside what we have \
                  intentionally scoped to `pub(crate)`; the effective \
                  visibility collapses to `pub(crate)` but the lint \
                  cannot see that. The generated output also does not \
                  conform to the workspace lint profile in other ways, \
                  and most of the generated Client is intentionally unused."
    )]

    include!(concat!(env!("OUT_DIR"), "/orderbook_generated.rs"));
}

#[allow(
    unused_imports,
    reason = "re-exported for the wire_compat tests; direct use elsewhere \
              is intentional dead code"
)]
pub(crate) use inner::types;