Skip to main content

WindowRootDescriptor

Trait WindowRootDescriptor 

Source
pub trait WindowRootDescriptor: Any {
    // Required methods
    fn layout_size(&self) -> Size;
    fn as_any(&self) -> &dyn Any;
}
Expand description

What a window root needs from the platform’s description of its window: the logical size to lay the content out into, read on every measure so a resize needs no new modifier, and the description itself for the platform to take back.

Required Methods§

Source

fn layout_size(&self) -> Size

The window’s content size in logical pixels.

Source

fn as_any(&self) -> &dyn Any

The descriptor as Any, so the platform that made it can downcast it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§