pub struct SlackPlanBlock {
pub title: String,
pub tasks: Vec<SlackTaskCardBlock>,
pub block_id: Option<SlackBlockId>,
}Expand description
- https://docs.slack.dev/reference/block-kit/blocks/plan-block
tasksholds up to 50 task-card objects without atypetag- (
SlackTaskCardBlockserialises without one); everytask_idin a plan - must be unique.
Fields§
§title: String§tasks: Vec<SlackTaskCardBlock>§block_id: Option<SlackBlockId>Implementations§
Source§impl SlackPlanBlock
impl SlackPlanBlock
Sourcepub fn new(title: String, tasks: Vec<SlackTaskCardBlock>) -> Self
pub fn new(title: String, tasks: Vec<SlackTaskCardBlock>) -> Self
Creates a new SlackPlanBlock from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn with_title(self, value: String) -> Self
pub fn with_title(self, value: String) -> Self
Returns self with title set to value.
Sourcepub fn tasks(&mut self, value: Vec<SlackTaskCardBlock>) -> &mut Self
pub fn tasks(&mut self, value: Vec<SlackTaskCardBlock>) -> &mut Self
Sets tasks to value.
Sourcepub fn with_tasks(self, value: Vec<SlackTaskCardBlock>) -> Self
pub fn with_tasks(self, value: Vec<SlackTaskCardBlock>) -> Self
Returns self with tasks set to value.
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.
Trait Implementations§
Source§impl Clone for SlackPlanBlock
impl Clone for SlackPlanBlock
Source§impl Debug for SlackPlanBlock
impl Debug for SlackPlanBlock
Source§impl<'de> Deserialize<'de> for SlackPlanBlock
impl<'de> Deserialize<'de> for SlackPlanBlock
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<SlackPlanBlock> for SlackBlock
impl From<SlackPlanBlock> for SlackBlock
Source§fn from(block: SlackPlanBlock) -> Self
fn from(block: SlackPlanBlock) -> Self
Converts to this type from the input type.
Source§impl From<SlackPlanBlockInit> for SlackPlanBlock
impl From<SlackPlanBlockInit> for SlackPlanBlock
Source§fn from(value: SlackPlanBlockInit) -> Self
fn from(value: SlackPlanBlockInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackPlanBlock
impl PartialEq for SlackPlanBlock
Source§impl Serialize for SlackPlanBlock
impl Serialize for SlackPlanBlock
impl StructuralPartialEq for SlackPlanBlock
Auto Trait Implementations§
impl Freeze for SlackPlanBlock
impl RefUnwindSafe for SlackPlanBlock
impl Send for SlackPlanBlock
impl Sync for SlackPlanBlock
impl Unpin for SlackPlanBlock
impl UnsafeUnpin for SlackPlanBlock
impl UnwindSafe for SlackPlanBlock
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