Struct microswitch::config::SwitchConfig [−][src]
pub struct SwitchConfig {
pub title: String,
pub key: Option<String>,
pub gamepad: Option<Gamepad>,
pub stop_sounds: bool,
pub play: Option<SwitchPlay>,
pub play_random: Option<SwitchPlayRandom>,
pub play_step: Option<SwitchPlayStep>,
pub switch_ref: SwitchRef,
pub key_code: Option<KeyCode>,
}
Fields
title: String
the title in the gui
key: Option<String>
trigger based on a keyboard key
gamepad: Option<Gamepad>
trigger based on a gamepad button
stop_sounds: bool
if true, stop all sounds
play: Option<SwitchPlay>
Play a specific sample in a specific bank
play_random: Option<SwitchPlayRandom>
play_step: Option<SwitchPlayStep>
switch_ref: SwitchRef
key_code: Option<KeyCode>
same as key
but translated to a KeyCode
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SwitchConfig
impl Send for SwitchConfig
impl Sync for SwitchConfig
impl Unpin for SwitchConfig
impl UnwindSafe for SwitchConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more