Skip to main content

Module keyboard

Module keyboard 

Source
Expand description

Inline keyboard builder — create reply markups without raw TL verbosity.

§Example

use layer_client::keyboard::{InlineKeyboard, Button};

let kb = InlineKeyboard::new()
    .row([Button::callback("✅ Yes", b"yes"),
          Button::callback("❌ No",  b"no")])
    .row([Button::url("📖 Docs", "https://docs.rs/layer-client")]);

// Pass to InputMessage:
// let msg = InputMessage::text("Choose:").keyboard(kb);

Structs§

Button
A single inline keyboard button.
InlineKeyboard
Builder for an inline keyboard reply markup.
ReplyKeyboard
Builder for a reply keyboard (shown below the message input box).