pub struct Attachment {Show 21 fields
pub id: Option<i64>,
pub fallback: Option<String>,
pub color: Option<String>,
pub pretext: Option<String>,
pub author_name: Option<String>,
pub author_link: Option<String>,
pub author_icon: Option<String>,
pub title: Option<String>,
pub title_link: Option<String>,
pub text: Option<String>,
pub fields: Vec<AttachmentField>,
pub image_url: Option<String>,
pub thumb_url: Option<String>,
pub thumb_width: Option<u32>,
pub thumb_height: Option<u32>,
pub service_name: Option<String>,
pub footer: Option<String>,
pub footer_icon: Option<String>,
pub ts: Option<AttachmentTs>,
pub mrkdwn_in: Vec<String>,
pub blocks: Vec<Block>,
}Expand description
A legacy secondary message attachment (can also hold blocks). https://docs.slack.dev/legacy/legacy-messaging/legacy-secondary-message-attachments
Fields§
§id: Option<i64>§fallback: Option<String>§color: Option<String>§pretext: Option<String>§title: Option<String>§title_link: Option<String>§text: Option<String>§fields: Vec<AttachmentField>§image_url: Option<String>§thumb_url: Option<String>§thumb_width: Option<u32>§thumb_height: Option<u32>§service_name: Option<String>§ts: Option<AttachmentTs>§mrkdwn_in: Vec<String>§blocks: Vec<Block>Implementations§
Source§impl Attachment
impl Attachment
pub fn new() -> Self
pub fn id(self, id: i64) -> Self
pub fn fallback(self, fallback: impl Into<String>) -> Self
pub fn color(self, color: impl Into<String>) -> Self
pub fn pretext(self, pretext: impl Into<String>) -> Self
pub fn title(self, title: impl Into<String>) -> Self
pub fn title_link(self, title_link: impl Into<String>) -> Self
pub fn text(self, text: impl Into<String>) -> Self
pub fn fields(self, fields: Vec<AttachmentField>) -> Self
pub fn image_url(self, image_url: impl Into<String>) -> Self
pub fn thumb_url(self, thumb_url: impl Into<String>) -> Self
pub fn thumb_width(self, thumb_width: u32) -> Self
pub fn thumb_height(self, thumb_height: u32) -> Self
pub fn service_name(self, service_name: impl Into<String>) -> Self
pub fn ts(self, ts: AttachmentTs) -> Self
pub fn mrkdwn_in(self, mrkdwn_in: Vec<String>) -> Self
pub fn blocks(self, blocks: Vec<Block>) -> Self
Trait Implementations§
Source§impl Clone for Attachment
impl Clone for Attachment
Source§impl Debug for Attachment
impl Debug for Attachment
Source§impl Default for Attachment
impl Default for Attachment
Source§impl<'de> Deserialize<'de> for Attachment
impl<'de> Deserialize<'de> for Attachment
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 PartialEq for Attachment
impl PartialEq for Attachment
Source§impl Serialize for Attachment
impl Serialize for Attachment
impl StructuralPartialEq for Attachment
Auto Trait Implementations§
impl Freeze for Attachment
impl RefUnwindSafe for Attachment
impl Send for Attachment
impl Sync for Attachment
impl Unpin for Attachment
impl UnsafeUnpin for Attachment
impl UnwindSafe for Attachment
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