pub struct BubbleOptionsBuilder { /* private fields */ }Expand description
Builder for BubbleOptions.
Implementations§
source§impl BubbleOptionsBuilder
impl BubbleOptionsBuilder
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: 1) - если значение 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<BubbleOptions, BubbleOptionsBuilderError>
pub fn build(&self) -> Result<BubbleOptions, BubbleOptionsBuilderError>
Trait Implementations§
source§impl Clone for BubbleOptionsBuilder
impl Clone for BubbleOptionsBuilder
source§fn clone(&self) -> BubbleOptionsBuilder
fn clone(&self) -> BubbleOptionsBuilder
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 BubbleOptionsBuilder
impl Send for BubbleOptionsBuilder
impl Sync for BubbleOptionsBuilder
impl Unpin for BubbleOptionsBuilder
impl UnwindSafe for BubbleOptionsBuilder
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