pub struct Markdown { /* private fields */ }Expand description
Markdown block representation.
§Fields and Validations
For more details, see the official documentation.
| Field | Type | Required | Validation |
|---|---|---|---|
| text | String | Yes | Maximum 12000 characters |
| block_id | String | No | Maximum 255 characters |
§Example
use slack_messaging::blocks::Markdown;
let markdown = Markdown::builder()
.block_id("markdown-0")
.text("**Lots of information here!!**")
.build()?;
let expected = serde_json::json!({
"type": "markdown",
"block_id": "markdown-0",
"text": "**Lots of information here!!**"
});
let json = serde_json::to_value(markdown).unwrap();
assert_eq!(json, expected);Implementations§
Source§impl Markdown
impl Markdown
Sourcepub fn builder() -> MarkdownBuilder
pub fn builder() -> MarkdownBuilder
constract MarkdownBuilder object.
Trait Implementations§
impl StructuralPartialEq for Markdown
Auto Trait Implementations§
impl Freeze for Markdown
impl RefUnwindSafe for Markdown
impl Send for Markdown
impl Sync for Markdown
impl Unpin for Markdown
impl UnsafeUnpin for Markdown
impl UnwindSafe for Markdown
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