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