pub struct ButtonKeyboard {
pub text: String,
pub url: Option<String>,
pub callback_data: Option<String>,
pub style: Option<ButtonStyle>,
}Expand description
Keyboard for send message methods One of variants must be set:
- {
text: String,url: String,style:ButtonStyle} - simple buttons - {
text: String,callback_data: String,style:ButtonStyle} - buttons with callback
Fields§
§text: String§url: Option<String>§callback_data: Option<String>§style: Option<ButtonStyle>Implementations§
Source§impl ButtonKeyboard
impl ButtonKeyboard
Sourcepub fn url(text: String, url: String, style: ButtonStyle) -> Self
pub fn url(text: String, url: String, style: ButtonStyle) -> Self
Create new ButtonKeyboard with URL
§Parameters
text:String- Button texturl:String- URLstyle:ButtonStyle- Button style
Sourcepub fn cb(text: String, cb: String, style: ButtonStyle) -> Self
pub fn cb(text: String, cb: String, style: ButtonStyle) -> Self
Create new ButtonKeyboard with callback data
§Parameters
text:String- Button textcb:String- Callback datastyle:ButtonStyle- Button style
Trait Implementations§
Source§impl Clone for ButtonKeyboard
impl Clone for ButtonKeyboard
Source§fn clone(&self) -> ButtonKeyboard
fn clone(&self) -> ButtonKeyboard
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ButtonKeyboard
impl Debug for ButtonKeyboard
Source§impl<'de> Deserialize<'de> for ButtonKeyboard
impl<'de> Deserialize<'de> for ButtonKeyboard
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ButtonKeyboard
impl PartialEq for ButtonKeyboard
Source§impl Serialize for ButtonKeyboard
impl Serialize for ButtonKeyboard
impl StructuralPartialEq for ButtonKeyboard
Auto Trait Implementations§
impl Freeze for ButtonKeyboard
impl RefUnwindSafe for ButtonKeyboard
impl Send for ButtonKeyboard
impl Sync for ButtonKeyboard
impl Unpin for ButtonKeyboard
impl UnwindSafe for ButtonKeyboard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more