pub struct WebConfig {
pub bind_addr: SocketAddr,
pub static_dir: Option<PathBuf>,
pub broadcast_capacity: usize,
}Expand description
Configuration for the web server.
Fields§
§bind_addr: SocketAddrAddress to bind to. Default: 127.0.0.1:3001.
static_dir: Option<PathBuf>Path to the Next.js static export directory (for production mode).
If None, only API/WS endpoints are served — the frontend runs
separately (e.g., next dev on port 3000).
broadcast_capacity: usizeMaximum WebSocket broadcast channel capacity. Default: 256.
Clients that fall behind by this many messages receive a fresh state snapshot to resynchronize.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebConfig
impl RefUnwindSafe for WebConfig
impl Send for WebConfig
impl Sync for WebConfig
impl Unpin for WebConfig
impl UnsafeUnpin for WebConfig
impl UnwindSafe for WebConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more