[−][src]Struct af_slack::Attachment
A message attachment.
Fields
blocks: Vec<Block<'a>>
A list of content blocks.
color: Cow<'a, str>
The color of the attachment.
Implementations
impl<'a> Attachment<'a>
[src]
pub const fn new() -> Self
[src]
Creates a new, blank attachment with the default color.
pub const fn debug() -> Self
[src]
Creates a new, blank attachment with a “debug” color.
pub const fn info() -> Self
[src]
Creates a new, blank attachment with an “info” color.
pub const fn warn() -> Self
[src]
Creates a new, blank attachment with a “warn” color.
pub const fn error() -> Self
[src]
Creates a new, blank attachment with an “error” color.
pub const fn success() -> Self
[src]
Creates a new, blank attachment with a “success” color.
pub fn add_block(&mut self, block: impl Into<Block<'a>>) -> &mut Self
[src]
Adds a block to the attachment.
pub fn set_color(&mut self, color: impl Into<Cow<'a, str>>) -> &mut Self
[src]
Sets the color of the attachment.
pub fn with_block(mut self: Self, block: impl Into<Block<'a>>) -> Self
[src]
Adds a block to the attachment.
pub fn with_color(mut self: Self, color: impl Into<Cow<'a, str>>) -> Self
[src]
Sets the color of the attachment.
Trait Implementations
impl<'a> Debug for Attachment<'a>
[src]
impl<'a> Default for Attachment<'a>
[src]
impl<'a> From<Attachment<'a>> for Message<'a>
[src]
fn from(attachment: Attachment<'a>) -> Self
[src]
impl<'a> Serialize for Attachment<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Attachment<'a>
[src]
impl<'a> Send for Attachment<'a>
[src]
impl<'a> Sync for Attachment<'a>
[src]
impl<'a> Unpin for Attachment<'a>
[src]
impl<'a> UnwindSafe for Attachment<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,