pub struct SlackAttachment {
pub color: Option<String>,
pub text: Option<String>,
pub title: Option<String>,
pub fallback: Option<String>,
pub pretext: Option<String>,
pub footer: Option<String>,
pub extra: HashMap<String, Value>,
}Expand description
A Slack legacy attachment. Common fields are typed; additional fields are captured via flatten.
Fields§
§color: Option<String>Attachment sidebar color (hex string, e.g., “#36a64f” for green).
text: Option<String>Main body text of the attachment (supports template variables).
title: Option<String>Bold title text at the top of the attachment.
fallback: Option<String>Plain-text summary shown in notifications that cannot render attachments.
pretext: Option<String>Text shown above the attachment block.
Small text shown at the bottom of the attachment.
extra: HashMap<String, Value>Additional attachment-specific fields.
Trait Implementations§
Source§impl Clone for SlackAttachment
impl Clone for SlackAttachment
Source§fn clone(&self) -> SlackAttachment
fn clone(&self) -> SlackAttachment
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 SlackAttachment
impl Debug for SlackAttachment
Source§impl Default for SlackAttachment
impl Default for SlackAttachment
Source§fn default() -> SlackAttachment
fn default() -> SlackAttachment
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SlackAttachment
impl<'de> Deserialize<'de> for SlackAttachment
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 SlackAttachment
impl JsonSchema for SlackAttachment
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 SlackAttachment
impl RefUnwindSafe for SlackAttachment
impl Send for SlackAttachment
impl Sync for SlackAttachment
impl Unpin for SlackAttachment
impl UnsafeUnpin for SlackAttachment
impl UnwindSafe for SlackAttachment
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