Files
alkhttp/src/websocket/mod.rs
T
glm-5.3-flash 2e15204aca fix(docs): resolve the 5 pre-existing rustdoc warnings
cargo doc --no-deps was not actually clean before review 007's
remediation — it emitted 5 warnings that went uncounted (grep for
"^error|^warning" in the gate runs matched only on error/warning at
line start, and the review baselines recorded "clean" without a
counting check; the warnings were first noticed while re-verifying
the review-007 gate set). All pre-existing, none introduced by
review 007:

- src/adapters/mod.rs: the bare [`OpenAPISpec`] intra-doc link did
  not resolve (the re-export sits in the same module, but rustdoc
  resolves module-level links against the module's own scope) —
  spelled out as `openapi_spec::OpenAPISpec`
- src/websocket/mod.rs: [`upgrade`] did not resolve from the
  `websocket` module doc (the submodule is not in scope for the
  parent's doc links) — plain `upgrade`
- src/websocket/upgrade.rs:215: [`CallConnection`] had no import in
  scope — spelled out via the full alkcall path
- src/websocket/upgrade.rs:291: [`install_channel_zero`] linked a
  private item from public docs — plain `install_channel_zero` hook
- src/server/adapter.rs:274: [`crate::websocket::OpenHandler`] is
  not re-exported from `websocket` — spelled out via the alkcall
  path

Verification: cargo doc --no-deps 0 warnings (was 5); cargo test 454
passed / 0 failed; cargo test --all-features 587 passed / 0 failed;
clippy (both configs) clean; fmt clean.

Review: docs/reviews/007-ws-data-channel-surface-review.md (the
baseline's "cargo doc → clean" claim was wrong on this dimension)
2026-09-05 05:59:54 +00:00

48 lines
2.0 KiB
Rust

//! WebSocket subsystem: the browser bidirectional path
//! (ADR-067, `docs/architecture/decisions`).
//!
//! A WS session carries the **channels protocol**: the 8-byte chunk
//! header multiplexes N logical channels over the WS binary message
//! stream; channel 0 is pre-negotiated as `alk/call` and dispatched by
//! the shared `Dispatcher`. The WS↔byte-stream adapter (`byte_adapter`)
//! is the single seam between axum's WS and
//! alkcall's byte-oriented channels machinery — shared with the
//! `from_wss` consumer path ([ADR-070]).
//!
//! Feature sides: `upgrade` (and the axum flavor of the adapter)
//! compile under `server`; the tungstenite flavor compiles under `wss`
//! (and under `test-support`); both are available with both features.
#[cfg(any(feature = "server", feature = "wss", test))]
pub mod byte_adapter;
#[cfg(feature = "server")]
pub mod upgrade;
#[cfg(any(feature = "server", feature = "wss", test))]
pub use byte_adapter::{
WsByteStream, WsPumps, DEFAULT_WS_IDLE_TIMEOUT, DEFAULT_WS_WRITE_TIMEOUT, INBOUND_WS_FRAME_CAP,
INBOUND_WS_MESSAGE_CAP, MAX_CHUNK_LEN, PENDING_BUFFER_CAP, WS_GOING_AWAY, WS_MESSAGE_CAP,
WS_PROTOCOL_ERROR,
};
#[cfg(feature = "server")]
pub use byte_adapter::{
split_ws_to_bytes, split_ws_to_bytes_idle, split_ws_to_bytes_idle_with_write,
};
#[cfg(feature = "server")]
pub use alkcall::channels::operations::ChannelCore;
#[cfg(any(test, feature = "wss"))]
pub use byte_adapter::split_tungstenite_to_bytes;
#[cfg(all(test, feature = "server", feature = "wss"))]
pub(crate) use upgrade::adapter_install_channel_zero;
#[cfg(feature = "server")]
pub use upgrade::{
run_channels_session, ws_bearer_auth, ws_upgrade_handler, ChannelsPolicy, OpRegisterAcl,
OpenableAlpn, OpenableAlpns, SessionSlots, SessionState, WsSessions, WsTimeouts,
DEFAULT_WS_MAX_SESSIONS,
};
#[cfg(all(any(test, feature = "test-support"), feature = "server"))]
pub use upgrade::test_support::{frame_channel0_chunk, ChunkAssembler, FrameAssembler, WsClient};