pub struct KeyboardTomlConfig {
pub host: Option<HostConfig>,
pub rmk: RmkConstantsConfig,
/* private fields */
}Expand description
Configurations for RMK keyboard.
Fields§
§host: Option<HostConfig>Set host configurations
rmk: RmkConstantsConfigRMK config constants
Implementations§
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
pub fn get_chip_model(&self) -> Result<ChipModel, String>
pub fn get_chip_config(&self) -> ChipConfig
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
pub fn get_communication_config(&self) -> Result<CommunicationConfig, String>
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
pub fn get_device_config(&self) -> Basic
pub fn get_dependency_config(&self) -> DependencyConfig
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
pub fn get_behavior_config(&self) -> Result<BehaviorConfig, String>
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
pub fn get_board_config(&self) -> Result<BoardConfig, String>
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
pub fn get_host_config(&self) -> HostConfig
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
Sourcepub fn get_layout_config(
&self,
) -> Result<(LayoutConfig, Vec<Vec<KeyInfo>>), String>
pub fn get_layout_config( &self, ) -> Result<(LayoutConfig, Vec<Vec<KeyInfo>>), String>
Layout is a mandatory field in toml, so we mainly check the sizes
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
pub fn get_light_config(&self) -> LightConfig
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
pub fn get_storage_config(&self) -> StorageConfig
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
pub fn new_from_toml_path<P: AsRef<Path>>(config_toml_path: P) -> Self
Sourcepub fn auto_calculate_parameters(&mut self)
pub fn auto_calculate_parameters(&mut self)
Auto calculate some parameters in toml:
- Update morse_max_num to fit all configured morses
- Update max_patterns_per_key to fit the max number of configured (pattern, action) pairs per morse key
- Update peripheral number based on the number of split boards
- TODO: Update controller number based on the number of split boards
Source§impl KeyboardTomlConfig
impl KeyboardTomlConfig
pub fn get_output_config(&self) -> Result<Vec<OutputConfig>, String>
Trait Implementations§
Source§impl Clone for KeyboardTomlConfig
impl Clone for KeyboardTomlConfig
Source§fn clone(&self) -> KeyboardTomlConfig
fn clone(&self) -> KeyboardTomlConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KeyboardTomlConfig
impl Debug for KeyboardTomlConfig
Source§impl<'de> Deserialize<'de> for KeyboardTomlConfig
impl<'de> Deserialize<'de> for KeyboardTomlConfig
Source§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
Auto Trait Implementations§
impl Freeze for KeyboardTomlConfig
impl RefUnwindSafe for KeyboardTomlConfig
impl Send for KeyboardTomlConfig
impl Sync for KeyboardTomlConfig
impl Unpin for KeyboardTomlConfig
impl UnwindSafe for KeyboardTomlConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)