pub struct SlackBlock {
pub block_type: String,
pub text: Option<SlackTextObject>,
pub block_id: Option<String>,
pub extra: HashMap<String, Value>,
}Expand description
A Slack Block Kit block element. Common fields are typed; additional block-type-specific fields are captured via flatten.
Fields§
§block_type: StringBlock type (e.g., “header”, “section”, “divider”, “actions”, “context”, “image”).
text: Option<SlackTextObject>Text object for the block (used by header, section, context types).
block_id: Option<String>Block ID for interactive payloads.
extra: HashMap<String, Value>Additional block-specific fields (elements, accessory, fields, etc.).
Trait Implementations§
Source§impl Clone for SlackBlock
impl Clone for SlackBlock
Source§fn clone(&self) -> SlackBlock
fn clone(&self) -> SlackBlock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SlackBlock
impl Debug for SlackBlock
Source§impl Default for SlackBlock
impl Default for SlackBlock
Source§fn default() -> SlackBlock
fn default() -> SlackBlock
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SlackBlock
impl<'de> Deserialize<'de> for SlackBlock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for SlackBlock
impl JsonSchema for SlackBlock
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for SlackBlock
impl RefUnwindSafe for SlackBlock
impl Send for SlackBlock
impl Sync for SlackBlock
impl Unpin for SlackBlock
impl UnsafeUnpin for SlackBlock
impl UnwindSafe for SlackBlock
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