Skip to main content

WindowController

Trait WindowController 

Source
pub trait WindowController {
    // Required method
    fn apply_command(
        &mut self,
        command: WindowCommand,
    ) -> Result<(), PlatformError>;
}
Expand description

Unified window control interface implemented by all platform backends.

Required Methods§

Source

fn apply_command(&mut self, command: WindowCommand) -> Result<(), PlatformError>

Applies a single WindowCommand to the underlying native or web window.

§Arguments
  • &Self - Mutable window controller.
  • WindowCommand - Command to apply.
§Returns
  • Result<(), PlatformError> - Success or platform error.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl WindowController for HeadlessPlatform

WindowController implementation for HeadlessPlatform.

Source§

impl WindowController for LinuxPlatform

WindowController implementation for Linux X11 / Wayland.