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

Construct a new HeaderBuilder

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.

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 for FileBuilder.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

This is supported on crate feature blox only.

Identity function

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.