pub struct BottomButtonParams<'a> {
pub text: Option<&'a str>,
pub color: Option<&'a str>,
pub text_color: Option<&'a str>,
pub is_active: Option<bool>,
pub is_visible: Option<bool>,
pub has_shine_effect: Option<bool>,
}
Expand description
Parameters accepted by bottom buttons when updating state via setParams
.
§Examples
use telegram_webapp_sdk::webapp::{BottomButton, BottomButtonParams, TelegramWebApp};
if let Some(app) = TelegramWebApp::instance() {
let params = BottomButtonParams {
text: Some("Send"),
is_active: Some(true),
..Default::default()
};
let _ = app.set_bottom_button_params(BottomButton::Main, ¶ms);
}
Fields§
§text: Option<&'a str>
§color: Option<&'a str>
§text_color: Option<&'a str>
§is_active: Option<bool>
§is_visible: Option<bool>
§has_shine_effect: Option<bool>
Trait Implementations§
Source§impl<'a> Debug for BottomButtonParams<'a>
impl<'a> Debug for BottomButtonParams<'a>
Source§impl<'a> Default for BottomButtonParams<'a>
impl<'a> Default for BottomButtonParams<'a>
Source§fn default() -> BottomButtonParams<'a>
fn default() -> BottomButtonParams<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for BottomButtonParams<'a>
impl<'a> RefUnwindSafe for BottomButtonParams<'a>
impl<'a> Send for BottomButtonParams<'a>
impl<'a> Sync for BottomButtonParams<'a>
impl<'a> Unpin for BottomButtonParams<'a>
impl<'a> UnwindSafe for BottomButtonParams<'a>
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