Struct
WindowPlacement
pub struct WindowPlacement {
pub x: i32,
pub y: i32,
pub width: u32,
pub height: u32,
pub state: WindowState,
}Where a window’s content is on the screen in density-independent pixels and how the window shows. A window maximized, minimized or fullscreen is placed where it restores to.
WindowClosing::placement gives one
as a window closes. WindowOptions::placement opens a window as one
says. Serialized with serde it is
{"x":200,"y":150,"width":900,"height":600,"state":"Maximized"} in JSON,
to keep with the application’s settings.
Fields
#pub x: i32
The content’s left edge, from the primary display’s top-left corner.
#pub y: i32
The content’s top edge.
#pub width: u32
The content’s width.
#pub height: u32
The content’s height.
#pub state: WindowState
How it shows.
Trait implementations
impl Clone for WindowPlacementimpl Copy for WindowPlacementimpl Debug for WindowPlacementimpl Eq for WindowPlacementimpl PartialEq for WindowPlacementimpl Serialize for WindowPlacementimpl<'de> Deserialize<'de> for WindowPlacement