Struct ChromiumEngine
pub struct ChromiumEngine { /* private fields */ }Expand description
A real Chromium process. Initialization errors are returned to the caller; this type never creates a simulated engine or weakens Chromium’s sandbox.
Implementations§
§impl ChromiumEngine
impl ChromiumEngine
pub fn new() -> Result<Arc<ChromiumEngine>, String>
pub fn new() -> Result<Arc<ChromiumEngine>, String>
Start the packaged runtime and persistent local profile.
§Errors
Returns an error if the runtime/profile cannot be located, prepared, or initialized.
pub fn new_with_extensions(
extensions: &[PathBuf],
) -> Result<Arc<ChromiumEngine>, String>
pub fn new_with_extensions( extensions: &[PathBuf], ) -> Result<Arc<ChromiumEngine>, String>
§Errors
Returns an error for invalid extensions, unavailable runtime/profile, or helper initialization failure.
pub fn new_private(root: &Path) -> Result<Arc<ChromiumEngine>, String>
pub fn new_private(root: &Path) -> Result<Arc<ChromiumEngine>, String>
§Errors
Returns an error if the private root is not owned, the runtime is missing, or initialization fails.
pub fn with_profile_extensions(
profile: &Path,
extensions: &[PathBuf],
) -> Result<Arc<ChromiumEngine>, String>
pub fn with_profile_extensions( profile: &Path, extensions: &[PathBuf], ) -> Result<Arc<ChromiumEngine>, String>
Explicit profile with the packaged helper and approved extensions.
§Errors
Returns an error for invalid extensions, profile preparation failure, or helper startup/initialization failure.
pub fn with_host(
host: &Path,
profile: &Path,
) -> Result<Arc<ChromiumEngine>, String>
pub fn with_host( host: &Path, profile: &Path, ) -> Result<Arc<ChromiumEngine>, String>
Explicit runtime/profile paths for packaging and isolated live tests.
§Errors
Returns an error if the profile cannot be prepared or the helper cannot start and initialize.
pub fn with_private_host(
host: &Path,
root: &Path,
) -> Result<Arc<ChromiumEngine>, String>
pub fn with_private_host( host: &Path, root: &Path, ) -> Result<Arc<ChromiumEngine>, String>
Start an incognito helper whose complete installation root is removed by the process supervisor only after the native child has exited.
§Errors
Returns an error if the private root is not owned, the profile cannot be prepared, or the helper cannot initialize.
Trait Implementations§
§impl Drop for ChromiumEngine
impl Drop for ChromiumEngine
§impl WebViewEngine for ChromiumEngine
impl WebViewEngine for ChromiumEngine
§fn handle_undo_request(&self, request: UndoRequest) -> bool
fn handle_undo_request(&self, request: UndoRequest) -> bool
§fn supports_guarded_edit_history(&self) -> bool
fn supports_guarded_edit_history(&self) -> bool
fn supports_text_input(&self) -> bool
§fn text_input(&self, request: Request) -> Option<Receipt>
fn text_input(&self, request: Request) -> Option<Receipt>
§fn create_tab(&self) -> Result<Arc<dyn WebViewEngine>, String>
fn create_tab(&self) -> Result<Arc<dyn WebViewEngine>, String>
§fn set_modifiers(&self, modifiers: KeyModifiers)
fn set_modifiers(&self, modifiers: KeyModifiers)
§fn set_visible(&self, visible: bool)
fn set_visible(&self, visible: bool)
§fn take_new_tab_requests(&self) -> Vec<(String, bool)>
fn take_new_tab_requests(&self) -> Vec<(String, bool)>
§fn supports_native_filtering(&self) -> bool
fn supports_native_filtering(&self) -> bool
WebKit JSON.§fn send(&self, command: WebViewCommand)
fn send(&self, command: WebViewCommand)
fn frames(&self) -> Arc<Mutex<Option<Frame>>> ⓘ
§fn drain_events(&self) -> Vec<WebViewEvent>
fn drain_events(&self) -> Vec<WebViewEvent>
§fn request_close(&self) -> bool
fn request_close(&self) -> bool
TabClosed, TabDetached or TabCloseBlocked.§fn drain_download_events(&self) -> Vec<WebViewEvent>
fn drain_download_events(&self) -> Vec<WebViewEvent>
§fn set_waker(&self, waker: Box<dyn Fn() + Send + Sync>)
fn set_waker(&self, waker: Box<dyn Fn() + Send + Sync>)
§fn presented(&self)
fn presented(&self)
paint::PaintEngine) resume here.§fn wrapped(&self) -> Option<&Arc<dyn WebViewEngine>>
fn wrapped(&self) -> Option<&Arc<dyn WebViewEngine>>
§fn paint_frame(&self) -> Option<Arc<Frame>>
fn paint_frame(&self) -> Option<Arc<Frame>>
§fn paint_blob(&self, _hash: &[u8; 32]) -> Option<Arc<Vec<u8>>>
fn paint_blob(&self, _hash: &[u8; 32]) -> Option<Arc<Vec<u8>>>
paint_frame references.§fn take_paint_stream(&self, _keyframe: bool) -> Vec<Payload>
fn take_paint_stream(&self, _keyframe: bool) -> Vec<Payload>
keyframe (or when the consumer must start over), else the patches
since the last call, followed by images not sent yet. Empty for an
engine without a display list.Auto Trait Implementations§
impl Freeze for ChromiumEngine
impl RefUnwindSafe for ChromiumEngine
impl Send for ChromiumEngine
impl Sync for ChromiumEngine
impl Unpin for ChromiumEngine
impl UnsafeUnpin for ChromiumEngine
impl UnwindSafe for ChromiumEngine
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more