Skip to main content

ModifyWindow

Trait ModifyWindow 

Source
pub trait ModifyWindow {
    // Required methods
    fn modify_window<T>(&mut self, f: impl FnOnce(&Window) -> T) -> Option<T>;
    fn window(&self) -> Option<Arc<Window>>;
}

Required Methods§

Source

fn modify_window<T>(&mut self, f: impl FnOnce(&Window) -> T) -> Option<T>

Takes a closure which mutates the parent window of the current view.

Source

fn window(&self) -> Option<Arc<Window>>

Returns a read-only pointer to the parent window of the current view.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§