pub struct Config {
pub host: IpAddr,
pub port: u16,
pub window: Option<String>,
pub origins: OriginPolicy,
pub extra_origins: Vec<String>,
pub serve_assets: bool,
pub timeout: Duration,
pub enabled_in_release: bool,
pub headless: bool,
}Expand description
Runtime configuration of the dev server. Build one with Builder.
Fields§
§host: IpAddrAddress the server binds to. Defaults to 127.0.0.1.
port: u16Port the server binds to. Defaults to DEFAULT_PORT.
window: Option<String>Label of the webview browser requests are routed through. Defaults to main, then
to whichever webview exists.
origins: OriginPolicyBrowser origins allowed to reach the server.
extra_origins: Vec<String>Extra origins to allow on top of OriginPolicy::Auto.
serve_assets: boolServe files for convertFileSrc() over HTTP. Defaults to true.
timeout: DurationHow long a single command may run before the request is answered with an error.
enabled_in_release: boolRun the server in release builds. Requires the allow-in-release cargo feature.
headless: boolHide the app’s windows so it runs as a background relay.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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