pub trait DisplayServer<H: Handle> {
// Required methods
fn new(config: &impl Config) -> Self;
fn get_next_events(&mut self) -> Vec<DisplayEvent<H>>;
fn reload_config(
&mut self,
config: &impl Config,
focused: Option<WindowHandle<H>>,
windows: &[Window<H>],
);
fn wait_readable(&self) -> Pin<Box<dyn Future<Output = ()>>>;
fn flush(&self);
fn generate_verify_focus_event(&self) -> Option<DisplayEvent<H>>;
// Provided methods
fn update_windows(&self, _windows: Vec<&Window<H>>) { ... }
fn update_workspaces(&self, _focused: Option<&Workspace>) { ... }
fn execute_action(
&mut self,
_act: DisplayAction<H>,
) -> Option<DisplayEvent<H>> { ... }
}
Required Methods§
fn new(config: &impl Config) -> Self
fn get_next_events(&mut self) -> Vec<DisplayEvent<H>>
fn reload_config( &mut self, config: &impl Config, focused: Option<WindowHandle<H>>, windows: &[Window<H>], )
fn wait_readable(&self) -> Pin<Box<dyn Future<Output = ()>>>
fn flush(&self)
fn generate_verify_focus_event(&self) -> Option<DisplayEvent<H>>
Provided Methods§
fn update_windows(&self, _windows: Vec<&Window<H>>)
fn update_workspaces(&self, _focused: Option<&Workspace>)
fn execute_action(&mut self, _act: DisplayAction<H>) -> Option<DisplayEvent<H>>
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.