pub struct BrowserPlatformOptions {
pub rendering_mode: Vec<BrowserRenderingMode>,
pub renderer: BrowserRenderer,
pub register_ferro_service_worker: bool,
pub ferro_service_worker_scope: Option<String>,
pub prefer_file_dialog_polyfill: bool,
pub render_thread: bool,
}Expand description
Options of the browser backend.
Fields§
§rendering_mode: Vec<BrowserRenderingMode>The rendering modes with fallbacks. The first element has the highest priority.
renderer: BrowserRendererThe render backend. Skia by default.
Not in the original. The Vello backend needs a module built with the
feature vello of this crate; the application fails to start
without it, with a message that names the feature.
register_ferro_service_worker: boolDefines if the service worker used by FerroUI should be registered. If registered, service worker can work as a save file picker fallback on the browsers that don’t support native implementation. For more details, see https://github.com/jimmywarting/native-file-system-adapter#a-note-when-downloading-with-the-polyfilled-version.
Unstable: this property might not work reliably.
ferro_service_worker_scope: Option<String>If register_ferro_service_worker
is enabled, it is possible to redefine scope for the worker. By
default the scope is the directory of the worker script, which is the
root of the site (the documentation of the original says the domain
root, which differs when the site is served from a subpath).
prefer_file_dialog_polyfill: boolThe file dialogs use the native-file-system-adapter polyfill. If
the native implementation is available, by default it is used. This
property forces the polyfill to be always used. For more details, see
https://github.com/jimmywarting/native-file-system-adapter#a-note-when-downloading-with-the-polyfilled-version.
render_thread: boolWhether a module built with threads renders on a render thread: the
compositor and the render backend then run in a worker that owns the
canvases of the views, and the thread of the page keeps the user
interface. true by default. With false such a module renders on
the thread of the page, as a module built without threads always
does; the option has no effect there.
Not in the original, where a build with threads always renders on its render worker.
Trait Implementations§
Source§impl Clone for BrowserPlatformOptions
impl Clone for BrowserPlatformOptions
Source§impl Debug for BrowserPlatformOptions
impl Debug for BrowserPlatformOptions
Source§impl Default for BrowserPlatformOptions
impl Default for BrowserPlatformOptions
impl Eq for BrowserPlatformOptions
Source§impl PartialEq for BrowserPlatformOptions
impl PartialEq for BrowserPlatformOptions
impl StructuralPartialEq for BrowserPlatformOptions
Auto Trait Implementations§
impl Freeze for BrowserPlatformOptions
impl RefUnwindSafe for BrowserPlatformOptions
impl Send for BrowserPlatformOptions
impl Sync for BrowserPlatformOptions
impl Unpin for BrowserPlatformOptions
impl UnsafeUnpin for BrowserPlatformOptions
impl UnwindSafe for BrowserPlatformOptions
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more