rmk-config 0.7.0

Config crate of RMK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Resolved physical layout: the compressed, opaque blob the firmware streams
/// verbatim over `GetLayout`. Empty when there's no `[layout].map`.
pub struct Layout {
    pub blob: Vec<u8>,
}

impl crate::KeyboardTomlConfig {
    /// Resolve the physical layout blob from the `[layout]` section.
    pub fn layout(&self) -> Result<Layout, String> {
        let blob = match &self.layout {
            Some(l) => crate::layout::build_layout_blob(l, Some(self.total_encoders()))?,
            None => Vec::new(),
        };
        Ok(Layout { blob })
    }
}