Problem
The run() and run_with_shutdown() methods in WireframeServer currently panic at runtime if bind() wasn't called beforehand. This leads to poor developer experience and potential runtime crashes.
Suggested Solution
Consider using a typestate or builder pattern to enforce binding at compile time instead of panicking at runtime. This would make the API safer and catch configuration errors during development rather than in production.
Context
Identified during code review of PR #262: #262
Comment: #262 (comment)
Issue: #263
Files Affected
src/server/runtime.rs
src/server/config.rs
Problem
The
run()andrun_with_shutdown()methods inWireframeServercurrently panic at runtime ifbind()wasn't called beforehand. This leads to poor developer experience and potential runtime crashes.Suggested Solution
Consider using a typestate or builder pattern to enforce binding at compile time instead of panicking at runtime. This would make the API safer and catch configuration errors during development rather than in production.
Context
Identified during code review of PR #262: #262
Comment: #262 (comment)
Issue: #263
Files Affected
src/server/runtime.rssrc/server/config.rs