#[non_exhaustive]pub struct WindowState {
pub maximized: bool,
}Expand description
The window state the windowing layer reports to the application.
More fields may follow, so a state is built from the default and the
with_ methods rather than as a struct literal:
use smudge_core::window::WindowState;
let state = WindowState::default().with_maximized(true);
assert!(state.maximized);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.maximized: boolWhether the window is maximized.
Implementations§
Source§impl WindowState
impl WindowState
Sourcepub fn with_maximized(self, maximized: bool) -> WindowState
pub fn with_maximized(self, maximized: bool) -> WindowState
Returns this state with its maximized flag set to maximized.
Trait Implementations§
Source§impl Clone for WindowState
impl Clone for WindowState
impl Copy for WindowState
Source§impl Debug for WindowState
impl Debug for WindowState
Source§impl Default for WindowState
impl Default for WindowState
impl Eq for WindowState
Source§impl PartialEq for WindowState
impl PartialEq for WindowState
impl StructuralPartialEq for WindowState
Auto Trait Implementations§
impl Forget for WindowState
impl Freeze for WindowState
impl Move for WindowState
impl RefUnwindSafe for WindowState
impl Send for WindowState
impl Sync for WindowState
impl Unpin for WindowState
impl UnsafeUnpin for WindowState
impl UnwindSafe for WindowState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more