Struct iced_wgpu::settings::Settings[][src]

pub struct Settings {
    pub format: TextureFormat,
    pub present_mode: PresentMode,
    pub internal_backend: BackendBit,
    pub default_font: Option<&'static [u8]>,
    pub default_text_size: u16,
    pub antialiasing: Option<Antialiasing>,
}

The settings of a Backend.

Fields

format: TextureFormat

The output format of the Backend.

present_mode: PresentMode

The present mode of the Backend.

internal_backend: BackendBit

The internal graphics backend to use.

default_font: Option<&'static [u8]>

The bytes of the font that will be used by default.

If None is provided, a default system font will be chosen.

default_text_size: u16

The default size of text.

By default, it will be set to 20.

antialiasing: Option<Antialiasing>

The antialiasing strategy that will be used for triangle primitives.

Implementations

impl Settings[src]

pub fn from_env() -> Self[src]

Creates new Settings using environment configuration.

Specifically:

  • The internal_backend can be configured using the WGPU_BACKEND environment variable. If the variable is not set, the primary backend will be used. The following values are allowed:
    • vulkan
    • metal
    • dx12
    • dx11
    • gl
    • webgpu

Trait Implementations

impl Clone for Settings[src]

impl Copy for Settings[src]

impl Debug for Settings[src]

impl Default for Settings[src]

impl Eq for Settings[src]

impl PartialEq<Settings> for Settings[src]

impl StructuralEq for Settings[src]

impl StructuralPartialEq for Settings[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast<T> for T

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IsDefault for T where
    T: Default + PartialEq<T> + Copy
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,