Struct kas_wgpu::options::Options [−][src]
pub struct Options {
pub config_path: PathBuf,
pub theme_config_path: PathBuf,
pub config_mode: ConfigMode,
pub power_preference: PowerPreference,
pub backends: Backends,
pub wgpu_trace_path: Option<PathBuf>,
}
Expand description
Shell options
Fields
config_path: PathBuf
Config file path. Default: empty. See KAS_CONFIG
doc.
theme_config_path: PathBuf
Theme config path. Default: empty.
config_mode: ConfigMode
Config mode. Default: Read.
power_preference: PowerPreference
Adapter power preference. Default value: low power.
backends: Backends
Adapter backend. Default value: PRIMARY (Vulkan/Metal/DX12).
wgpu_trace_path: Option<PathBuf>
WGPU’s API tracing path
Implementations
Construct a new instance, reading from environment variables
The following environment variables are read, in case-insensitive mode.
Config files
WARNING: file formats are not stable and may not be compatible across KAS versions (aside from patch versions)!
The KAS_CONFIG
variable, if given, provides a path to the KAS config
file, which is read or written according to KAS_CONFIG_MODE
.
If KAS_CONFIG
is not specified, platform-default configuration is used
without reading or writing. This may change to use a platform-specific
default path in future versions.
The KAS_THEME_CONFIG
variable, if given, provides a path to the theme
config file, which is read or written according to KAS_CONFIG_MODE
.
If KAS_THEME_CONFIG
is not specified, 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-onlyReadWrite
: read on start-up, write on exitWriteDefault
: generate platform-default configuration and write it to the config path(s) specified, overwriting any existing config
Note: in the future, the default will likely change to a read-write mode, allowing changes to be written out.
Graphics options
The KAS_POWER_PREFERENCE
variable supports:
Default
LowPower
HighPerformance
The KAS_BACKENDS
variable supports:
Vulkan
GL
Metal
DX11
DX12
PRIMARY
: any of Vulkan, Metal or DX12SECONDARY
: any of GL or DX11
WGPU has an API tracing feature for debugging. To use this, ensure the
wgpu/trace
feature is enabled and set the output path:
export KAS_WGPU_TRACE_PATH="api_trace"
Load/save theme config on start
Load/save KAS config on start
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Options
impl UnwindSafe for Options
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,
pub fn cast_trunc(self) -> T
pub fn cast_trunc(self) -> T
Cast to integer, truncating Read more
pub fn cast_nearest(self) -> T
pub fn cast_nearest(self) -> T
Cast to the nearest integer Read more
pub fn cast_floor(self) -> T
pub fn cast_floor(self) -> T
Cast the floor to an integer Read more
pub fn try_cast_trunc(self) -> Result<T, Error>
pub fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
pub fn try_cast_nearest(self) -> Result<T, Error>
pub fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
pub fn try_cast_floor(self) -> Result<T, Error>
pub fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
pub fn try_cast_ceil(self) -> Result<T, Error>
pub fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more