pub struct ImageBlock {
pub alt_text: String,
pub image_url: Option<String>,
pub slack_file: Option<SlackFile>,
pub title: Option<TextObject>,
pub block_id: Option<String>,
/* private fields */
}Expand description
An image block (either image_url or slack_file). https://docs.slack.dev/reference/block-kit/blocks/image-block
Fields§
§alt_text: String§image_url: Option<String>§slack_file: Option<SlackFile>§title: Option<TextObject>§block_id: Option<String>Implementations§
Source§impl ImageBlock
impl ImageBlock
pub fn new(image_url: impl Into<String>, alt_text: impl Into<String>) -> Self
pub fn from_slack_file( slack_file: SlackFile, alt_text: impl Into<String>, ) -> Self
pub fn image_url(self, image_url: impl Into<String>) -> Self
pub fn slack_file(self, slack_file: SlackFile) -> Self
pub fn title(self, title: impl Into<TextObject>) -> Self
pub fn block_id(self, block_id: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for ImageBlock
impl Clone for ImageBlock
Source§impl Debug for ImageBlock
impl Debug for ImageBlock
Source§impl<'de> Deserialize<'de> for ImageBlock
impl<'de> Deserialize<'de> for ImageBlock
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 From<ImageBlock> for Block
impl From<ImageBlock> for Block
Source§fn from(value: ImageBlock) -> Self
fn from(value: ImageBlock) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ImageBlock
impl PartialEq for ImageBlock
Source§impl Serialize for ImageBlock
impl Serialize for ImageBlock
impl StructuralPartialEq for ImageBlock
Auto Trait Implementations§
impl Freeze for ImageBlock
impl RefUnwindSafe for ImageBlock
impl Send for ImageBlock
impl Sync for ImageBlock
impl Unpin for ImageBlock
impl UnsafeUnpin for ImageBlock
impl UnwindSafe for ImageBlock
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