mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
docs: add doc comments to macros
This commit is contained in:
parent
c5369328f4
commit
828436745c
7 changed files with 9 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ pub trait Handle {
|
|||
}
|
||||
}
|
||||
|
||||
/// Implement the `Handle` trait.
|
||||
#[macro_export] macro_rules! handle {
|
||||
($T:ty) => {
|
||||
impl Handle for $T {}
|
||||
|
|
@ -70,12 +71,14 @@ pub fn handle_keymap <T> (
|
|||
Ok(false)
|
||||
}
|
||||
|
||||
/// Define a key binding.
|
||||
#[macro_export] macro_rules! key {
|
||||
($k:ident $(($char:literal))?, $m:ident, $n: literal, $d: literal, $f: expr) => {
|
||||
(KeyCode::$k $(($char))?, KeyModifiers::$m, $n, $d, &$f)
|
||||
};
|
||||
}
|
||||
|
||||
/// Define a keymap.
|
||||
#[macro_export] macro_rules! keymap {
|
||||
($T:ty { $([$k:ident $(($char:literal))?, $m:ident, $n: literal, $d: literal, $f: expr]),* $(,)? }) => {
|
||||
&[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue