pub struct SlackTableBlock {
pub block_id: Option<SlackBlockId>,
pub rows: Vec<Vec<SlackTableCell>>,
pub column_settings: Option<Vec<SlackTableColumnSetting>>,
}Expand description
- https://docs.slack.dev/reference/block-kit/blocks/table-block
Fields§
§block_id: Option<SlackBlockId>§rows: Vec<Vec<SlackTableCell>>§column_settings: Option<Vec<SlackTableColumnSetting>>Implementations§
Source§impl SlackTableBlock
impl SlackTableBlock
Sourcepub fn new(rows: Vec<Vec<SlackTableCell>>) -> Self
pub fn new(rows: Vec<Vec<SlackTableCell>>) -> Self
Creates a new SlackTableBlock 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 rows(&mut self, value: Vec<Vec<SlackTableCell>>) -> &mut Self
pub fn rows(&mut self, value: Vec<Vec<SlackTableCell>>) -> &mut Self
Sets rows to value.
Sourcepub fn with_rows(self, value: Vec<Vec<SlackTableCell>>) -> Self
pub fn with_rows(self, value: Vec<Vec<SlackTableCell>>) -> Self
Returns self with rows set to value.
Sourcepub fn column_settings(
&mut self,
value: Vec<SlackTableColumnSetting>,
) -> &mut Self
pub fn column_settings( &mut self, value: Vec<SlackTableColumnSetting>, ) -> &mut Self
Sets column_settings to Some(value).
Sourcepub fn reset_column_settings(&mut self) -> &mut Self
pub fn reset_column_settings(&mut self) -> &mut Self
Sets column_settings to None.
Sourcepub fn mopt_column_settings(
&mut self,
value: Option<Vec<SlackTableColumnSetting>>,
) -> &mut Self
pub fn mopt_column_settings( &mut self, value: Option<Vec<SlackTableColumnSetting>>, ) -> &mut Self
Sets column_settings to the given Option.
Sourcepub fn with_column_settings(self, value: Vec<SlackTableColumnSetting>) -> Self
pub fn with_column_settings(self, value: Vec<SlackTableColumnSetting>) -> Self
Returns self with column_settings set to Some(value).
Sourcepub fn without_column_settings(self) -> Self
pub fn without_column_settings(self) -> Self
Returns self with column_settings set to None.
Sourcepub fn opt_column_settings(
self,
value: Option<Vec<SlackTableColumnSetting>>,
) -> Self
pub fn opt_column_settings( self, value: Option<Vec<SlackTableColumnSetting>>, ) -> Self
Returns self with column_settings set to the given Option.
Trait Implementations§
Source§impl Clone for SlackTableBlock
impl Clone for SlackTableBlock
Source§impl Debug for SlackTableBlock
impl Debug for SlackTableBlock
Source§impl<'de> Deserialize<'de> for SlackTableBlock
impl<'de> Deserialize<'de> for SlackTableBlock
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<SlackTableBlock> for SlackBlock
impl From<SlackTableBlock> for SlackBlock
Source§fn from(block: SlackTableBlock) -> Self
fn from(block: SlackTableBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackTableBlockInit> for SlackTableBlock
impl From<SlackTableBlockInit> for SlackTableBlock
Source§fn from(value: SlackTableBlockInit) -> Self
fn from(value: SlackTableBlockInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackTableBlock
impl PartialEq for SlackTableBlock
Source§impl Serialize for SlackTableBlock
impl Serialize for SlackTableBlock
impl StructuralPartialEq for SlackTableBlock
Auto Trait Implementations§
impl Freeze for SlackTableBlock
impl RefUnwindSafe for SlackTableBlock
impl Send for SlackTableBlock
impl Sync for SlackTableBlock
impl Unpin for SlackTableBlock
impl UnsafeUnpin for SlackTableBlock
impl UnwindSafe for SlackTableBlock
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