Struct slack_blocks::blocks::header::build::HeaderBuilder [−][src]
pub struct HeaderBuilder<'a, T> { /* fields omitted */ }
Expand description
Build an Header block
Allows you to construct safely, with compile-time checks on required setter methods.
Required Methods
HeaderBuilder::build()
is only available if these methods have been called:
text
Example
use slack_blocks::blocks::Header; let block = Header::builder().block_id("foo").text("bar").build();
Implementations
Set text
(Required)
The text for the block, in the form of a plain_text
text object 🔗.
Maximum length for the text
in this field is 150 characters.
This is supported on crate feature blox
only.
blox
only.XML child alias for Self::text()
A string acting as a unique identifier for a block.
If not specified, one will be generated.
Maximum length for this field is 255 characters.
block_id
should be unique for each message and each iteration of a message.
If a message is updated, use a new block_id
.
All done building, now give me a darn actions block!
no method name 'build' found for struct 'FileBuilder<...>'
? Make sure all required setter methods have been called. See docs forFileBuilder
.
use slack_blocks::blocks::Header; let foo = Header::builder().build(); // Won't compile!
use slack_blocks::blocks::Header; let block = Header::builder().text("Foo").build();
Trait Implementations
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for HeaderBuilder<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for HeaderBuilder<'a, T> where
T: Send,
impl<'a, T> Sync for HeaderBuilder<'a, T> where
T: Sync,
impl<'a, T> Unpin for HeaderBuilder<'a, T> where
T: Unpin,
impl<'a, T> UnwindSafe for HeaderBuilder<'a, T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more