#button #keyboard #vk #serde #type #line #payload

vk-keyboard

An easy to use and simple implementation of VK keyboard types in Rust with serde support

2 unstable releases

0.2.0 May 11, 2020
0.1.0 May 9, 2020

#1692 in Hardware support

MIT license

14KB
301 lines

An easy to use and simple implementation of VK keyboard types in Rust with serde support.

Install

[dependencies]
vk_keyboard = "*"

Using

Check /examples directory for more examples.

let kb: Keyboard = keyboard!(
        true,
        lines!(
            buttons!(
                text_button!(
                    ButtonColor::Positive,
                    "Hello world!",
                    payload!("payload" => "of the button")
                ),
                text_button!("Hello second")
            ),
            buttons!(
                text_button!("Hello world on the second line"),
                text_button!("second hello world on the second line")
            )
        )
    );

lib.rs:

An easy to use and simple implementation of VK keyboard types in Rust with serde support.

Dependencies

~0.7–1.6MB
~34K SLoC