Skip to main content

DevToolsExtensions

Trait DevToolsExtensions 

Source
pub trait DevToolsExtensions {
    // Required methods
    fn attach_dev_tools(&self);
    fn attach_dev_tools_with_options(&self, options: Rc<DevToolsOptions>);
}
Expand description

Extension methods for attaching DevTools..

Implemented by top levels (windows) and by the application.

Required Methods§

Source

fn attach_dev_tools(&self)

Attaches DevTools, to be opened with the F12 key.

Source

fn attach_dev_tools_with_options(&self, options: Rc<DevToolsOptions>)

Attaches DevTools, to be opened with the specified options.

options are the additional settings of DevTools.

For an application, attach DevTools should only be called after application initialization is complete. A good point is on_framework_initialization_completed:

ⓘ
impl ApplicationImpl for App {
    fn on_framework_initialization_completed(this: &Self) {
        // Create the main window of the lifetime of the application...
        Self::parent_on_framework_initialization_completed(this);
        this.attach_dev_tools_with_options(DevToolsOptions::new().with_startup_screen_index(Some(1)));
    }
}

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl DevToolsExtensions for Application

Source§

fn attach_dev_tools(&self)

Attaches DevTools to an application, to be opened with the F12 key.

Source§

fn attach_dev_tools_with_options(&self, options: Rc<DevToolsOptions>)

Attaches DevTools to an application, to be opened with the specified options.

Source§

impl DevToolsExtensions for TopLevel

Source§

fn attach_dev_tools(&self)

Attaches DevTools to a window, to be opened with the F12 key.

Source§

fn attach_dev_tools_with_options(&self, options: Rc<DevToolsOptions>)

Attaches DevTools to a window, to be opened with the specified options.

Implementors§