Skip to main content

CefRuntime

Struct CefRuntime 

Source
pub struct CefRuntime<T: UserEvent = EventLoopMessage> { /* private fields */ }

Trait Implementations§

Source§

impl<T: UserEvent> Debug for CefRuntime<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: UserEvent> Runtime<T> for CefRuntime<T>

Source§

type WindowDispatcher = CefWindowDispatcher<T>

The window message dispatcher.
Source§

type WebviewDispatcher = CefWebviewDispatcher<T>

The webview message dispatcher.
Source§

type Handle = CefRuntimeHandle<T>

The runtime handle type.
Source§

type EventLoopProxy = EventProxy<T>

The proxy type.
Source§

type RuntimeWebviewAttributes = CefWebviewAttributes

The runtime-specific webview attributes, set on the webview builders through the runtime’s extension traits. Read more
Source§

type Webview = Webview

The platform webview handle exposed through WebviewDispatch::with_webview. Read more
Source§

type RuntimeInitAttrs = Cef

Runtime-specific initialization attributes. Also used to select this runtime, see RuntimeInitAttrs.
Source§

type WindowOpener = NewWindowOpener

Data about the window that requested the new window for PendingWebview::new_window_handler.
Source§

fn new(args: RuntimeInitArgs<Self::RuntimeInitAttrs>) -> Result<Self>

Creates a new webview runtime. Must be used on the main thread.
Source§

fn new_any_thread(args: RuntimeInitArgs<Self::RuntimeInitAttrs>) -> Result<Self>

Creates a new webview runtime on any thread.
Source§

fn create_proxy(&self) -> Self::EventLoopProxy

Creates an EventLoopProxy that can be used to dispatch user events to the main event loop.
Source§

fn handle(&self) -> Self::Handle

Gets a runtime handle.
Source§

fn create_window<F: Fn(RawWindow<'_>) + Send + 'static>( &self, pending: PendingWindow<T, Self>, after_window_creation: Option<F>, ) -> Result<DetachedWindow<T, Self>>

Create a new window.
Source§

fn create_webview( &self, window_id: WindowId, pending: PendingWebview<T, Self>, ) -> Result<DetachedWebview<T, Self>>

Create a new webview.
Source§

fn primary_monitor(&self) -> Option<Monitor>

Returns the primary monitor of the system. Read more
Source§

fn monitor_from_point(&self, x: f64, y: f64) -> Option<Monitor>

Returns the monitor that contains the given point.
Source§

fn available_monitors(&self) -> Vec<Monitor>

Returns the list of all the monitors available on the system.
Source§

fn cursor_position(&self) -> Result<PhysicalPosition<f64>>

Get the cursor position relative to the top-left hand corner of the desktop.
Source§

fn set_theme(&self, theme: Option<Theme>)

Sets the app theme.
Source§

fn set_device_event_filter(&mut self, filter: DeviceEventFilter)

Change the device event filter mode. Read more
Source§

fn run_iteration<F: FnMut(RunEvent<T>) + 'static>(&mut self, callback: F)

Runs an iteration of the runtime event loop and returns control flow to the caller.
Source§

fn run_return<F: FnMut(RunEvent<T>) + 'static>(self, callback: F) -> i32

Equivalent to Runtime::run but returns the exit code instead of exiting the process.
Source§

fn run<F: FnMut(RunEvent<T>) + 'static>(self, callback: F)

Run the webview runtime.

Auto Trait Implementations§

§

impl<T = EventLoopMessage> !RefUnwindSafe for CefRuntime<T>

§

impl<T = EventLoopMessage> !Send for CefRuntime<T>

§

impl<T = EventLoopMessage> !Sync for CefRuntime<T>

§

impl<T = EventLoopMessage> !UnwindSafe for CefRuntime<T>

§

impl<T> Freeze for CefRuntime<T>
where Receiver<Message<T>>: Freeze, RuntimeContext<T>: Freeze,

§

impl<T> Unpin for CefRuntime<T>
where Receiver<Message<T>>: Unpin, RuntimeContext<T>: Unpin,

§

impl<T> UnsafeUnpin for CefRuntime<T>
where Receiver<Message<T>>: UnsafeUnpin, RuntimeContext<T>: UnsafeUnpin,

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

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

Source§

fn into_raw(self) -> U

Source§

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

Source§

fn wrap_result(self) -> U

Source§

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

Source§

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.
Source§

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.
Source§

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.
Source§

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.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<W> Runtime for W

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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