BrowserPlatformOptions
struct · ferroui-browser · v0.5.0
struct BrowserPlatformOptions
Options of the browser backend.
Members
rendering_moderendererregister_ferro_service_workerferro_service_worker_scopeprefer_file_dialog_polyfillrender_thread
rendering_mode
rendering_mode: Vec<BrowserRenderingMode>
The rendering modes with fallbacks. The first element has the highest priority.
renderer
renderer: BrowserRenderer
The render backend. Skia by default when enabled, otherwise Vello.
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
register_ferro_service_worker: bool
Defines 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
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
prefer_file_dialog_polyfill: bool
The 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
render_thread: bool
Whether 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
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedUpcast<T>PropertyValueAnyValueClassDefaultsCloneDebugStructuralPartialEqPartialEqEqDefaultErasedDestructorIntoEither
Availability
Extracted for wasm32-unknown-emscripten, aarch64-apple-darwin. Cargo features are listed in the crate index.