Context
Related to PR #424 which refactored the connection module and highlighted documentation quality concerns.
Request from: @leynos
Source: #424
Objective
Address documentation inconsistencies and missing module documentation to improve developer experience and API clarity.
Issues to address
1. WireframeProtocol documentation inconsistency
Problem:
WireframeProtocol documentation shows arbitrary ProtocolError types (e.g., String) at src/hooks.rs:22, but WireframeApp::with_protocol only accepts ProtocolError = () today at src/app/builder.rs:294.
Proposed solutions:
- Option A: Document this limitation explicitly in the builder documentation to set correct expectations
- Option B: Generalise the app/connection pipeline to carry a
ProtocolError type parameter to support arbitrary error types as documented
2. Missing module documentation
Problem:
The module src/fragment/tests.rs:1 is missing the required //! module documentation comment.
Solution:
Add appropriate //! module documentation to src/fragment/tests.rs describing the module's purpose and contents.
Benefits
- Improves API documentation accuracy
- Reduces developer confusion
- Ensures consistent documentation standards across the codebase
Context
Related to PR #424 which refactored the connection module and highlighted documentation quality concerns.
Request from: @leynos
Source: #424
Objective
Address documentation inconsistencies and missing module documentation to improve developer experience and API clarity.
Issues to address
1. WireframeProtocol documentation inconsistency
Problem:
WireframeProtocoldocumentation shows arbitraryProtocolErrortypes (e.g.,String) atsrc/hooks.rs:22, butWireframeApp::with_protocolonly acceptsProtocolError = ()today atsrc/app/builder.rs:294.Proposed solutions:
ProtocolErrortype parameter to support arbitrary error types as documented2. Missing module documentation
Problem:
The module
src/fragment/tests.rs:1is missing the required//!module documentation comment.Solution:
Add appropriate
//!module documentation tosrc/fragment/tests.rsdescribing the module's purpose and contents.Benefits