pub struct WindowSettings {
pub title: String,
pub min_size: (u32, u32),
pub max_size: Option<(u32, u32)>,
pub initial_size: Option<(u32, u32)>,
pub borderless: bool,
pub surface_settings: SurfaceSettings,
}Expand description
Settings for the default Window.
Fields§
§title: StringThe title of the window.
On web this has no effect.
min_size: (u32, u32)The minimum size of the window (width, height), in logical pixels.
On web this has no effect.
max_size: Option<(u32, u32)>The maximum size of the window (width, height), in logical pixels.
If None is specified, the window can be maximized.
initial_size: Option<(u32, u32)>The initial size of the window (width, height), in logical pixels.
If None is specified, defaults to max_size.
On web, the size will be applied to the [canvas][WindowSettings::canvas], in logical pixels.
If None is specified on both this and max_size, the canvas will be
resized to the same size as the owner Window’s inner width and height.
borderless: boolBorderless mode.
On web this has no effect.
surface_settings: SurfaceSettingsSettings related to the surface on where to draw.
Trait Implementations§
Source§impl Clone for WindowSettings
Available on crate feature window only.
impl Clone for WindowSettings
Available on crate feature
window only.Source§fn clone(&self) -> WindowSettings
fn clone(&self) -> WindowSettings
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowSettings
Available on crate feature window only.
impl Debug for WindowSettings
Available on crate feature
window only.Source§impl Default for WindowSettings
Available on crate feature window only.
impl Default for WindowSettings
Available on crate feature
window only.Source§impl Deref for WindowSettings
Available on crate feature window only.
impl Deref for WindowSettings
Available on crate feature
window only.Source§impl DerefMut for WindowSettings
Available on crate feature window only.
impl DerefMut for WindowSettings
Available on crate feature
window only.Source§impl PartialEq for WindowSettings
Available on crate feature window only.
impl PartialEq for WindowSettings
Available on crate feature
window only.impl Eq for WindowSettings
Available on crate feature
window only.impl StructuralPartialEq for WindowSettings
Available on crate feature
window only.Auto Trait Implementations§
impl Freeze for WindowSettings
impl RefUnwindSafe for WindowSettings
impl Send for WindowSettings
impl Sync for WindowSettings
impl Unpin for WindowSettings
impl UnwindSafe for WindowSettings
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