Struct telegram_bot2::models::KeyboardButtonBuilder
source · pub struct KeyboardButtonBuilder { /* private fields */ }Expand description
Builder for the KeyboardButton structure
Implementations§
source§impl KeyboardButtonBuilder
impl KeyboardButtonBuilder
sourcepub fn new(text: String) -> Self
pub fn new(text: String) -> Self
Instantiate the builder with the fields text, request_contact, request_location, request_poll, web_app
sourcepub fn request_contact(self, val: bool) -> Self
pub fn request_contact(self, val: bool) -> Self
Set the field request_contact to the given value
sourcepub fn request_location(self, val: bool) -> Self
pub fn request_location(self, val: bool) -> Self
Set the field request_location to the given value
sourcepub fn request_poll(self, val: KeyboardButtonPollType) -> Self
pub fn request_poll(self, val: KeyboardButtonPollType) -> Self
Set the field request_poll to the given value
sourcepub fn web_app(self, val: WebAppInfo) -> Self
pub fn web_app(self, val: WebAppInfo) -> Self
Set the field web_app to the given value
Trait Implementations§
source§impl Builder for KeyboardButtonBuilder
impl Builder for KeyboardButtonBuilder
§type Value = KeyboardButton
type Value = KeyboardButton
Type to be built