Skip to main content

ChromiumEngine

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

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>

§Errors

Returns an error for invalid extensions, unavailable runtime/profile, or helper initialization failure.

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>

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>

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>

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

§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
§

impl WebViewEngine for ChromiumEngine

§

fn handle_undo_request(&self, request: UndoRequest) -> bool

Offer system Undo/Redo to this page’s native editing history. True means the backend consumed the request, not that a history entry existed or that an asynchronous edit has already completed.
§

fn supports_guarded_edit_history(&self) -> bool

Whether original-field acknowledged Undo/Redo is supported.
§

fn supports_text_input(&self) -> bool

§

fn text_input(&self, request: Request) -> Option<Receipt>

Private text transactions never enter the app event or page-agent stream.
§

fn navigate_owned( &self, request_id: u32, command: NavigationCommand, ) -> Result<(), String>

Admit a navigation and reserve its terminal outcome. IDs must increase strictly within this engine’s lifetime and fit a positive CEF signed integer. Read more
§

fn create_tab(&self) -> Result<Arc<dyn WebViewEngine>, String>

Create an independent document in the same runtime/profile. Read more
§

fn set_modifiers(&self, modifiers: KeyModifiers)

Keep pointer modifiers current even when no key event reaches the page.
§

fn set_visible(&self, visible: bool)

Suspend painting without discarding the document or its session history.
§

fn take_new_tab_requests(&self) -> Vec<(String, bool)>

Native new-window intents, delivered to browser chrome as tab requests.
§

fn supports_native_filtering(&self) -> bool

Whether this backend accepts source rules instead of WebKit JSON.
§

fn send(&self, command: WebViewCommand)

Enqueue a command. Must never block on engine work.
§

fn frames(&self) -> Arc<Mutex<Option<Frame>>> ⓘ

§

fn drain_events(&self) -> Vec<WebViewEvent>

Take all pending events, oldest first.
§

fn request_close(&self) -> bool

Request native close admission. True allows immediate local close; false completes asynchronously through TabClosed, TabDetached or TabCloseBlocked.
§

fn drain_download_events(&self) -> Vec<WebViewEvent>

Runtime-owned download events, independent of a tab lifetime.
§

fn set_waker(&self, waker: Box<dyn Fn() + Send + Sync>)

Invoked (from any thread) whenever a new frame or event is ready — typically wired to the winit event loop proxy so idle apps repaint on engine activity. Synchronous engines don’t need one.
§

fn presented(&self)

A view drew this engine’s page just now. Engines that stop painting pages nobody draws (see paint::PaintEngine) resume here.
§

fn wrapped(&self) -> Option<&Arc<dyn WebViewEngine>>

The engine this one wraps, for what only a backend can answer.
§

fn paint_frame(&self) -> Option<Arc<Frame>>

The page as a display list. An engine that has one is drawn from it instead of frames (see paint).
§

fn paint_blob(&self, _hash: &[u8; 32]) -> Option<Arc<Vec<u8>>>

Encoded bytes of an image a paint_frame references.
§

fn take_paint_stream(&self, _keyframe: bool) -> Vec<Payload>

The page as a stream for a session to share: a whole frame when 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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> Fruit for T
where T: Send + Downcast,

§

impl<T> MaybeSendSync for T
where T: Send + Sync + ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T

§

impl<T> WasmNotSync for T
where T: Sync,