Options

Struct Options 

Source
pub struct Options {
    pub width: u32,
    pub height: u32,
    pub title: String,
    pub fullscreen: bool,
    pub decorated: bool,
    pub msaa: Option<u32>,
    pub vsync: bool,
}
Expand description

Options for creating a display.

Fields§

§width: u32

With of the window in pixels.

§height: u32

Height of the window in pixels. Consider the aspect ratio (width/height) as 16/9.

§title: String

Title of the window.

§fullscreen: bool

Whether the window occupies all the monitor.

§decorated: bool

Whether the window has frame. Meaningfull when not in fullscreen mode.

§msaa: Option<u32>

Amount of fragments per pixel. Gives high quality smoother edges, but costly. Must be powers of 2 (I guess). Consider Some(4) for good quality/performance. Disabled if None.

§vsync: bool

Whether a monitor refresh must be waited between frames. Can decrease the frame rate a lot when struggling around the refresh rate. If not setted the frame rate is unbounded, which can lead to tearing.

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.