Struct slack_blocks::compose::confirm::build::ConfirmBuilder [−][src]
pub struct ConfirmBuilder<Title, Text, Confirm, Deny> { /* fields omitted */ }
Expand description
Confirm Builder
Allows you to construct safely, with compile-time checks on required setter methods.
Required Methods
ConfirmBuilder::build()
is only available if these methods have been called:
title
text
confirm
deny
use slack_blocks::compose::Confirm; let foo = Confirm::builder().title("do stuff?") .text_plain("stuff") .confirm("do the stuff") .deny("wait no") .build();
Implementations
Set style
(Required)
Defines the color scheme applied to the confirm
button.
A value of danger
will display the button with a red background on desktop, or red text on mobile.
A value of primary
will display the button with a green background on desktop, or blue text on mobile.
If this field is not provided, the default value will be primary
.
Set title
(Required)
A plain_text
-only text object 🔗 that defines the dialog’s title.
Maximum length for this field is 100 characters.
Set confirm
(Required)
A plain_text
-only text object 🔗 to define
the text of the button that confirms the action.
Maximum length for the text
in this field is 30 characters.
Set deny
(Required)
A plain_text
-only text object 🔗 to define
the text of the button that cancels the action.
Maximum length for the text
in this field is 30 characters.
Set text
(Required)
A text object 🔗 that defines the explanatory text that appears in the confirm dialog.
Maximum length for the text
in this field is 300 characters.
pub fn text_plain(
self,
t: impl Into<Plain>
) -> ConfirmBuilder<Title, Set<text>, Confirm, Deny>
[src]
pub fn text_plain(
self,
t: impl Into<Plain>
) -> ConfirmBuilder<Title, Set<text>, Confirm, Deny>
[src]Set text
to some plain text (Required)
A text object 🔗 that defines the explanatory text that appears in the confirm dialog.
Maximum length for the text
in this field is 300 characters.
Set text
to some markdown (Required)
A text object 🔗 that defines the explanatory text that appears in the confirm dialog.
Maximum length for the text
in this field is 300 characters.
All done building, now give me a darn confirm object!
no method name 'build' found for struct 'ConfirmBuilder<...>'
? Make sure all required setter methods have been called. See docs forConfirmBuilder
.
use slack_blocks::compose::Confirm; let foo = Confirm::builder().build(); // Won't compile!
use slack_blocks::compose::Confirm; let foo = Confirm::builder().title("do stuff?") .text_plain("stuff") .confirm("do the stuff") .deny("wait no") .build();
Trait Implementations
Auto Trait Implementations
impl<Title, Text, Confirm, Deny> RefUnwindSafe for ConfirmBuilder<Title, Text, Confirm, Deny> where
Confirm: RefUnwindSafe,
Deny: RefUnwindSafe,
Text: RefUnwindSafe,
Title: RefUnwindSafe,
impl<Title, Text, Confirm, Deny> Send for ConfirmBuilder<Title, Text, Confirm, Deny> where
Confirm: Send,
Deny: Send,
Text: Send,
Title: Send,
impl<Title, Text, Confirm, Deny> Sync for ConfirmBuilder<Title, Text, Confirm, Deny> where
Confirm: Sync,
Deny: Sync,
Text: Sync,
Title: Sync,
impl<Title, Text, Confirm, Deny> Unpin for ConfirmBuilder<Title, Text, Confirm, Deny> where
Confirm: Unpin,
Deny: Unpin,
Text: Unpin,
Title: Unpin,
impl<Title, Text, Confirm, Deny> UnwindSafe for ConfirmBuilder<Title, Text, Confirm, Deny> where
Confirm: UnwindSafe,
Deny: UnwindSafe,
Text: UnwindSafe,
Title: UnwindSafe,