pub struct SlackCarouselBlock {
pub block_id: Option<SlackBlockId>,
pub elements: Vec<SlackBlock>,
}Expand description
- https://docs.slack.dev/reference/block-kit/blocks/carousel-block
Fields§
§block_id: Option<SlackBlockId>§elements: Vec<SlackBlock>Implementations§
Source§impl SlackCarouselBlock
impl SlackCarouselBlock
Sourcepub fn new(elements: Vec<SlackBlock>) -> Self
pub fn new(elements: Vec<SlackBlock>) -> Self
Creates a new SlackCarouselBlock 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 elements(&mut self, value: Vec<SlackBlock>) -> &mut Self
pub fn elements(&mut self, value: Vec<SlackBlock>) -> &mut Self
Sets elements to value.
Sourcepub fn with_elements(self, value: Vec<SlackBlock>) -> Self
pub fn with_elements(self, value: Vec<SlackBlock>) -> Self
Returns self with elements set to value.
Trait Implementations§
Source§impl Clone for SlackCarouselBlock
impl Clone for SlackCarouselBlock
Source§impl Debug for SlackCarouselBlock
impl Debug for SlackCarouselBlock
Source§impl<'de> Deserialize<'de> for SlackCarouselBlock
impl<'de> Deserialize<'de> for SlackCarouselBlock
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<SlackCarouselBlock> for SlackBlock
impl From<SlackCarouselBlock> for SlackBlock
Source§fn from(block: SlackCarouselBlock) -> Self
fn from(block: SlackCarouselBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackCarouselBlockInit> for SlackCarouselBlock
impl From<SlackCarouselBlockInit> for SlackCarouselBlock
Source§fn from(value: SlackCarouselBlockInit) -> Self
fn from(value: SlackCarouselBlockInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackCarouselBlock
impl PartialEq for SlackCarouselBlock
Source§impl Serialize for SlackCarouselBlock
impl Serialize for SlackCarouselBlock
impl StructuralPartialEq for SlackCarouselBlock
Auto Trait Implementations§
impl Freeze for SlackCarouselBlock
impl RefUnwindSafe for SlackCarouselBlock
impl Send for SlackCarouselBlock
impl Sync for SlackCarouselBlock
impl Unpin for SlackCarouselBlock
impl UnsafeUnpin for SlackCarouselBlock
impl UnwindSafe for SlackCarouselBlock
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