pub struct ContextOptions {
pub start_port: u16,
pub title: String,
pub favicon: Option<Vec<u8>>,
pub public: bool,
}Expand description
Options for creating a wgui Context.
Fields§
§start_port: u16Starting port for the HTTP server (WS gets port + 1).
title: StringPage title shown in the browser tab.
favicon: Option<Vec<u8>>Optional PNG favicon bytes. When None, no favicon is served.
public: boolWhen true, bind to 0.0.0.0 (accessible on the network).
When false, bind to 127.0.0.1 (localhost only).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContextOptions
impl RefUnwindSafe for ContextOptions
impl Send for ContextOptions
impl Sync for ContextOptions
impl Unpin for ContextOptions
impl UnsafeUnpin for ContextOptions
impl UnwindSafe for ContextOptions
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