pub struct VersoBuilder(/* private fields */);
Expand description
A builder for configuring and creating a VersoviewController
instance.
Implementations§
Source§impl VersoBuilder
impl VersoBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new VersoBuilder
with default settings.
Sourcepub fn with_panel(self, with_panel: bool) -> Self
pub fn with_panel(self, with_panel: bool) -> Self
Sets whether the control panel should be included.
Sourcepub fn inner_size(self, size: impl Into<Size>) -> Self
pub fn inner_size(self, size: impl Into<Size>) -> Self
Sets the initial window size.
Sourcepub fn maximized(self, maximized: bool) -> Self
pub fn maximized(self, maximized: bool) -> Self
Sets whether the window should start maximized.
Sourcepub fn visible(self, visible: bool) -> Self
pub fn visible(self, visible: bool) -> Self
Sets whether the window should be visible initially.
Sourcepub fn fullscreen(self, fullscreen: bool) -> Self
pub fn fullscreen(self, fullscreen: bool) -> Self
Sets whether the window should start in fullscreen mode.
Sourcepub fn focused(self, focused: bool) -> Self
pub fn focused(self, focused: bool) -> Self
Sets whether the window will be initially focused or not.
Sourcepub fn decorated(self, decorated: bool) -> Self
pub fn decorated(self, decorated: bool) -> Self
Sets whether the window will be initially decorated or not.
Sourcepub fn transparent(self, transparent: bool) -> Self
pub fn transparent(self, transparent: bool) -> Self
Sets whether the window will be initially transparent or not.
Sourcepub fn title(self, title: impl Into<String>) -> Self
pub fn title(self, title: impl Into<String>) -> Self
Sets the initial title of the window in the title bar.
Sourcepub fn devtools_port(self, port: u16) -> Self
pub fn devtools_port(self, port: u16) -> Self
Port number to start a server to listen to remote Firefox devtools connections. 0 for random port.
Sourcepub fn profiler_settings(self, settings: ProfilerSettings) -> Self
pub fn profiler_settings(self, settings: ProfilerSettings) -> Self
Sets the profiler settings.
Sourcepub fn user_agent(self, user_agent: impl Into<String>) -> Self
pub fn user_agent(self, user_agent: impl Into<String>) -> Self
Overrides the user agent.
Sourcepub fn user_script(self, script: impl Into<UserScript>) -> Self
pub fn user_script(self, script: impl Into<UserScript>) -> Self
Adds an user script to run when the document starts loading.
Sourcepub fn user_scripts<I, S>(self, scripts: I) -> Selfwhere
I: IntoIterator<Item = S>,
S: Into<UserScript>,
pub fn user_scripts<I, S>(self, scripts: I) -> Selfwhere
I: IntoIterator<Item = S>,
S: Into<UserScript>,
Adds multiple user scripts to run when the document starts loading.
Sourcepub fn zoom_level(self, zoom: f32) -> Self
pub fn zoom_level(self, zoom: f32) -> Self
Sets the initial zoom level of the webview.
Sourcepub fn resources_directory(self, path: impl Into<PathBuf>) -> Self
pub fn resources_directory(self, path: impl Into<PathBuf>) -> Self
Sets the resource directory path.
Sourcepub fn build(
self,
versoview_path: impl AsRef<Path>,
initial_url: Url,
) -> VersoviewController
pub fn build( self, versoview_path: impl AsRef<Path>, initial_url: Url, ) -> VersoviewController
Builds the VersoviewController
with the configured settings.
Trait Implementations§
Source§impl Clone for VersoBuilder
impl Clone for VersoBuilder
Source§fn clone(&self) -> VersoBuilder
fn clone(&self) -> VersoBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more