vizia_winit

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", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ModifyWindow for EventContext<'_>

Source§

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

Source§

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

Implementors§