pub trait WebViewBackend {
// Required method
fn open(
&mut self,
web_view_id: WebViewId,
window_id: TeksiloWindowId,
parent: Option<ParentHandle>,
attrs: WebViewAttributes,
poster: Option<Arc<dyn AppEventPoster>>,
) -> Box<dyn WebViewHandle>;
}Expand description
Swappable web-view engine backend.
The real backends (WryBackend / ServoBackend, behind their features)
create a native engine subview parented to the host window. The test
backend (MemoryWebViewBackend) records calls and synthesizes events.
Required Methods§
Sourcefn open(
&mut self,
web_view_id: WebViewId,
window_id: TeksiloWindowId,
parent: Option<ParentHandle>,
attrs: WebViewAttributes,
poster: Option<Arc<dyn AppEventPoster>>,
) -> Box<dyn WebViewHandle>
fn open( &mut self, web_view_id: WebViewId, window_id: TeksiloWindowId, parent: Option<ParentHandle>, attrs: WebViewAttributes, poster: Option<Arc<dyn AppEventPoster>>, ) -> Box<dyn WebViewHandle>
Create a native engine subview for web_view_id, parented to
window_id’s OS window. The backend MUST deliver browser events by
calling AppEventPoster::post_external on poster with a boxed
WebViewEventPayload whose web_view_id / window_id_owner match.
parent is None when the host context can’t surface an OS handle
(headless tests, or a build-time open before the window-ops sink is
available); native backends treat None as “defer until a handle
arrives” rather than failing hard.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".