Struct kas_wgpu::options::Options [−][src]
Shell options
Fields
config_path: PathBufConfig file path. Default: empty. See KAS_CONFIG doc.
config_mode: ConfigModeConfig mode. Default: Read.
power_preference: PowerPreferenceAdapter power preference. Default value: low power.
backends: BackendBitAdapter backend. Default value: PRIMARY (Vulkan/Metal/DX12).
Implementations
impl Options[src]
pub fn from_env() -> Self[src]
Construct a new instance, reading from environment variables
The following environment variables are read, in case-insensitive mode.
Config
The KAS_CONFIG variable, if given, provides a path to the KAS config
file, where configuration can be read and/or written.
WARNING: file formats are unstable!
If KAS_CONFIG is not set, platform-default configuration is used
without reading or writing. This may change to use a platform-specific
default path in future versions.
The KAS_CONFIG_MODE variable determines the read/write mode:
Read(default): read-onlyWriteDefault: generate platform-default configuration, and write it to the config path, overwriting any existing config
Note: in the future, the default will likely change to a read-write mode, allowing changes to be written out.
Power preference
The KAS_POWER_PREFERENCE variable supports:
DefaultLowPowerHighPerformance
Backend
The KAS_BACKENDS variable supports:
VulkanGLMetalDX11DX12PRIMARY: any of Vulkan, Metal or DX12SECONDARY: any of GL or DX11
pub fn config(&self) -> Result<Config, Error>[src]
Load KAS config
Trait Implementations
impl Clone for Options[src]
impl Default for Options[src]
impl Hash for Options[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl PartialEq<Options> for Options[src]
impl StructuralPartialEq for Options[src]
Auto Trait Implementations
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> CallHasher for T where
T: Hash,
T: Hash,
impl<S, T> Cast<T> for S where
T: Conv<S>,
T: Conv<S>,
impl<S, T> CastFloat<T> for S where
T: ConvFloat<S>,
T: ConvFloat<S>,
pub fn cast_trunc(self) -> T
pub fn cast_nearest(self) -> T
pub fn cast_floor(self) -> T
pub fn cast_ceil(self) -> T
pub fn try_cast_trunc(self) -> Result<T, Error>
pub fn try_cast_nearest(self) -> Result<T, Error>
pub fn try_cast_floor(self) -> Result<T, Error>
pub fn try_cast_ceil(self) -> Result<T, Error>
impl<T> Conv<T> for T
impl<T> Downcast<T> for T
impl<'a, T, X> Filter<&'a T> for X where
T: Clone,
X: Filter<T>, [src]
T: Clone,
X: Filter<T>,
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Upcast<T> for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,