pub struct ButtonBuilder { /* private fields */ }
Expand description
Builder for Button
.
Implementations§
Source§impl ButtonBuilder
impl ButtonBuilder
Sourcepub fn with_command<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn with_command<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
тело команды (текст, который будет отправлен от пользователя и придёт в поле body)
Sourcepub fn with_label<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn with_label<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
наименование команды (текст кнопки)
Sourcepub fn with_data<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self
pub fn with_data<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self
(Default: {}) - объект с данными, которые будут отправлены в качестве параметров команды при нажатие на кнопку
Sourcepub fn with_opts<VALUE: Into<ButtonOptions>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn with_opts<VALUE: Into<ButtonOptions>>( &mut self, value: VALUE, ) -> &mut Self
объект с клиентскими опциями кнопки
Trait Implementations§
Source§impl Clone for ButtonBuilder
impl Clone for ButtonBuilder
Source§fn clone(&self) -> ButtonBuilder
fn clone(&self) -> ButtonBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ButtonBuilder
impl RefUnwindSafe for ButtonBuilder
impl Send for ButtonBuilder
impl Sync for ButtonBuilder
impl Unpin for ButtonBuilder
impl UnwindSafe for ButtonBuilder
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