Real-time WebSocket server with rooms and broadcasting
| Tier | infrastructure |
| Role | unclassified (baselined) |
| Path | crates/infrastructure/websocket |
| Edition | 2021 |
| Targets | infrastructure_websocket |
| Public items | 0 across 0 modules |
| Tests | 16 |
What it is for
Real-time WebSocket server with rooms and broadcasting.
Provides a room-based WebSocket server for real-time communication.
Capabilities
No public items.
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
No public modules: the crate root is its whole surface.
Public surface
No public items.
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
Client | client::Client |
WebSocketError | error::WebSocketError |
{Message,MessageType} | message::{Message,MessageType} |
{Room,RoomManager} | room::{Room,RoomManager} |
Boundary
Reaches into foundation.
Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | infrastructure |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/infrastructure/websocket |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_infrastructure["infrastructure"] --> n_foundation["foundation"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-basemodels` | foundation | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
chrono | ^0.4 | serde | no | always |
dashmap | ^6 | — | no | always |
futures-util | ^0.3 | — | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
thiserror | ^2 | — | no | always |
tokio | ^1 | full | no | always |
tokio-tungstenite | ^0.24 | — | no | always |
tracing | ^0.1 | — | no | always |
uuid | ^1 | v4, v7, serde, js | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tokio-test | ^0.4 | — | no | always |
Build. None.
Depended on by. 1 workspace crate.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_websocket["application-websocket"] -->|uses| SELF SELF["infrastructure-websocket"] SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| lib | infrastructure_websocket | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | yes |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
1 workspace crate depends on this one: application-websocket.
Verification
| Kind | Count |
|---|---|
| Unit tests | 16 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
What the tests establish, by name:
test_client_join_room—src/lib.rstest_client_leave_room—src/lib.rstest_client_new—src/lib.rstest_client_with_user_id—src/lib.rstest_message_json_conversion—src/lib.rstest_message_new—src/lib.rstest_message_types—src/lib.rstest_message_with_sender—src/lib.rstest_room_add_client—src/lib.rstest_room_manager_create_room—src/lib.rstest_room_manager_get_client_rooms—src/lib.rstest_room_manager_join_room_creates_if_missing—src/lib.rstest_room_manager_leave_room—src/lib.rstest_room_manager_new—src/lib.rstest_room_new—src/lib.rstest_room_remove_client—src/lib.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 0 | 0 |
Public modules with a //! block | 0 | 0 |
Metrics
| Metric | Value |
|---|---|
| Rust source files | 5 |
| Source lines | 633 |
| Code lines | 396 |
| Public API items | 0 |
| Public modules | 0 |
| Tests | 16 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 11 |
| Workspace reverse dependencies | 1 |
pie showData
title Rust source composition
"Code" : 396
"Blank or comment" : 237
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.