Struct WindowBuilder

Source
pub struct WindowBuilder { /* private fields */ }
Expand description

Window builder.

Implementations§

Source§

impl WindowBuilder

Source

pub fn with_title<S>(self, title: S) -> WindowBuilder
where S: Into<String>,

Sets a title of the window under building.

§Parameters:
  • title - Window title.
Source

pub fn with_init_mode(self, mode: InitMode) -> WindowBuilder

Sets an initial mode of the window under building.

§Parameters:
  • mode - Initial mode.
Source

pub fn with_size(self, size: Size) -> WindowBuilder

Sets a frame size of the window under building.

§Parameters:
  • size - Window frame size.
Source

pub fn with_logical_size<S>(self, size: S) -> WindowBuilder
where S: Into<LogicalSize<f64>>,

Sets a logical frame size of the window under building.

§Parameters:
  • size - Logical window frame size.
Source

pub fn with_physical_size<S>(self, size: S) -> WindowBuilder
where S: Into<PhysicalSize<u32>>,

Sets a physical frame size of the window under building.

§Parameters:
  • size - Physical window frame size.
Source

pub fn with_options(self, options: WindowOptions) -> WindowBuilder

Sets options of the window under building.

§Parameters:
  • options - Window options.
Source

pub fn build(self, ctx: &impl ContextOwner) -> Window

Builds a new window instance with passed parameters.

§Parameters:
  • ctx - Context onwer.

Trait Implementations§

Source§

impl Default for WindowBuilder

Source§

fn default() -> WindowBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,