pub struct ButtonOptionsBuilder { /* private fields */ }Expand description
Builder for ButtonOptions.
Implementations§
source§impl ButtonOptionsBuilder
 
impl ButtonOptionsBuilder
sourcepub fn with_silent<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
 
pub fn with_silent<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
(Default: false) - если значение true, то при нажатие на кнопку в чат не будет отправлено сообщение с текстом команды и сама команда отправится боту в фоне
sourcepub fn with_h_size<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
 
pub fn with_h_size<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
(Default: 1) - размер кнопки по горизонтали
sourcepub fn with_show_alert<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
 
pub fn with_show_alert<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
(Default: false) - если значение true, то при нажатии на кнопку отобразится всплывающее уведомление с заданным в alert_text сообщением
sourcepub fn with_alert_text<VALUE: Into<String>>(
    &mut self,
    value: VALUE
) -> &mut Self
 
pub fn with_alert_text<VALUE: Into<String>>( &mut self, value: VALUE ) -> &mut Self
(Default: null) - текст уведомления. Если значение null, то выведется тело команды
sourcepub fn with_handler<VALUE: Into<Handler>>(&mut self, value: VALUE) -> &mut Self
 
pub fn with_handler<VALUE: Into<Handler>>(&mut self, value: VALUE) -> &mut Self
(Default: “bot”) - если значение “client”, то при нажатии на кнопку команда не должна отправляться боту, а должна обрабатываться самим клиентом
sourcepub fn with_font_color<VALUE: Into<String>>(
    &mut self,
    value: VALUE
) -> &mut Self
 
pub fn with_font_color<VALUE: Into<String>>( &mut self, value: VALUE ) -> &mut Self
(Default: null) - цвет текста в hex формате
sourcepub fn with_background_color<VALUE: Into<String>>(
    &mut self,
    value: VALUE
) -> &mut Self
 
pub fn with_background_color<VALUE: Into<String>>( &mut self, value: VALUE ) -> &mut Self
(Default: null) - цвет фона/границ в hex формате
sourcepub fn with_align<VALUE: Into<Align>>(&mut self, value: VALUE) -> &mut Self
 
pub fn with_align<VALUE: Into<Align>>(&mut self, value: VALUE) -> &mut Self
(Default: “left”) - выравнивание текста left|center|right
sourcepub fn build(&self) -> Result<ButtonOptions, ButtonOptionsBuilderError>
 
pub fn build(&self) -> Result<ButtonOptions, ButtonOptionsBuilderError>
Trait Implementations§
source§impl Clone for ButtonOptionsBuilder
 
impl Clone for ButtonOptionsBuilder
source§fn clone(&self) -> ButtonOptionsBuilder
 
fn clone(&self) -> ButtonOptionsBuilder
Returns a copy 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 moreAuto Trait Implementations§
impl RefUnwindSafe for ButtonOptionsBuilder
impl Send for ButtonOptionsBuilder
impl Sync for ButtonOptionsBuilder
impl Unpin for ButtonOptionsBuilder
impl UnwindSafe for ButtonOptionsBuilder
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