Skip to main content

EguiDisplayHandle

Trait EguiDisplayHandle 

Source
pub trait EguiDisplayHandle:
    HasDisplayHandle
    + Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn clone_for_wgpu(&self) -> Box<dyn WgpuHasDisplayHandle>;
    fn clone_display_handle(&self) -> Box<dyn EguiDisplayHandle>;
}
Expand description

A cloneable display handle for use with wgpu::InstanceDescriptor.

wgpu::InstanceDescriptor stores its display handle as a non-cloneable Box<dyn WgpuHasDisplayHandle>. This trait wraps it so it can be cloned alongside the rest of the egui wgpu configuration.

Automatically implemented for all types that satisfy the bounds (including winit::event_loop::OwnedDisplayHandle).

Required Methods§

Source

fn clone_for_wgpu(&self) -> Box<dyn WgpuHasDisplayHandle>

Clone into a Box<dyn WgpuHasDisplayHandle> for wgpu::InstanceDescriptor::display.

Source

fn clone_display_handle(&self) -> Box<dyn EguiDisplayHandle>

Clone into a new Box<dyn EguiDisplayHandle>.

Trait Implementations§

Source§

impl Clone for Box<dyn EguiDisplayHandle>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§

Source§

impl<T> EguiDisplayHandle for T
where T: HasDisplayHandle + Clone + Debug + Send + Sync + 'static,