pub struct SlackAlertBlock {
pub block_id: Option<SlackBlockId>,
pub text: SlackBlockText,
pub level: Option<SlackAlertLevel>,
}Fields§
§block_id: Option<SlackBlockId>§text: SlackBlockText§level: Option<SlackAlertLevel>Implementations§
Source§impl SlackAlertBlock
impl SlackAlertBlock
Sourcepub fn new(text: SlackBlockText) -> Self
pub fn new(text: SlackBlockText) -> Self
Creates a new SlackAlertBlock from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn block_id(&mut self, value: SlackBlockId) -> &mut Self
pub fn block_id(&mut self, value: SlackBlockId) -> &mut Self
Sets block_id to Some(value).
Sourcepub fn reset_block_id(&mut self) -> &mut Self
pub fn reset_block_id(&mut self) -> &mut Self
Sets block_id to None.
Sourcepub fn mopt_block_id(&mut self, value: Option<SlackBlockId>) -> &mut Self
pub fn mopt_block_id(&mut self, value: Option<SlackBlockId>) -> &mut Self
Sets block_id to the given Option.
Sourcepub fn with_block_id(self, value: SlackBlockId) -> Self
pub fn with_block_id(self, value: SlackBlockId) -> Self
Returns self with block_id set to Some(value).
Sourcepub fn without_block_id(self) -> Self
pub fn without_block_id(self) -> Self
Returns self with block_id set to None.
Sourcepub fn opt_block_id(self, value: Option<SlackBlockId>) -> Self
pub fn opt_block_id(self, value: Option<SlackBlockId>) -> Self
Returns self with block_id set to the given Option.
Sourcepub fn text(&mut self, value: SlackBlockText) -> &mut Self
pub fn text(&mut self, value: SlackBlockText) -> &mut Self
Sets text to value.
Sourcepub fn with_text(self, value: SlackBlockText) -> Self
pub fn with_text(self, value: SlackBlockText) -> Self
Returns self with text set to value.
Sourcepub fn level(&mut self, value: SlackAlertLevel) -> &mut Self
pub fn level(&mut self, value: SlackAlertLevel) -> &mut Self
Sets level to Some(value).
Sourcepub fn reset_level(&mut self) -> &mut Self
pub fn reset_level(&mut self) -> &mut Self
Sets level to None.
Sourcepub fn mopt_level(&mut self, value: Option<SlackAlertLevel>) -> &mut Self
pub fn mopt_level(&mut self, value: Option<SlackAlertLevel>) -> &mut Self
Sets level to the given Option.
Sourcepub fn with_level(self, value: SlackAlertLevel) -> Self
pub fn with_level(self, value: SlackAlertLevel) -> Self
Returns self with level set to Some(value).
Sourcepub fn without_level(self) -> Self
pub fn without_level(self) -> Self
Returns self with level set to None.
Sourcepub fn opt_level(self, value: Option<SlackAlertLevel>) -> Self
pub fn opt_level(self, value: Option<SlackAlertLevel>) -> Self
Returns self with level set to the given Option.
Trait Implementations§
Source§impl Clone for SlackAlertBlock
impl Clone for SlackAlertBlock
Source§impl Debug for SlackAlertBlock
impl Debug for SlackAlertBlock
Source§impl<'de> Deserialize<'de> for SlackAlertBlock
impl<'de> Deserialize<'de> for SlackAlertBlock
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<SlackAlertBlock> for SlackBlock
impl From<SlackAlertBlock> for SlackBlock
Source§fn from(block: SlackAlertBlock) -> Self
fn from(block: SlackAlertBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackAlertBlockInit> for SlackAlertBlock
impl From<SlackAlertBlockInit> for SlackAlertBlock
Source§fn from(value: SlackAlertBlockInit) -> Self
fn from(value: SlackAlertBlockInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackAlertBlock
impl PartialEq for SlackAlertBlock
Source§impl Serialize for SlackAlertBlock
impl Serialize for SlackAlertBlock
impl StructuralPartialEq for SlackAlertBlock
Auto Trait Implementations§
impl Freeze for SlackAlertBlock
impl RefUnwindSafe for SlackAlertBlock
impl Send for SlackAlertBlock
impl Sync for SlackAlertBlock
impl Unpin for SlackAlertBlock
impl UnsafeUnpin for SlackAlertBlock
impl UnwindSafe for SlackAlertBlock
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