pub struct SlackCanvasChange {
pub operation: SlackCanvasOperation,
pub section_id: Option<SlackCanvasSectionId>,
pub document_content: Option<SlackCanvasDocumentContent>,
pub title_content: Option<SlackCanvasDocumentContent>,
}Expand description
One edit. insert_before / insert_after / delete need section_id;
every insert and replace need document_content (replace without a
section_id replaces the whole canvas); rename takes title_content.
Fields§
§operation: SlackCanvasOperation§section_id: Option<SlackCanvasSectionId>§document_content: Option<SlackCanvasDocumentContent>§title_content: Option<SlackCanvasDocumentContent>Implementations§
Source§impl SlackCanvasChange
impl SlackCanvasChange
Sourcepub fn new(operation: SlackCanvasOperation) -> Self
pub fn new(operation: SlackCanvasOperation) -> Self
Creates a new SlackCanvasChange from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn operation(&mut self, value: SlackCanvasOperation) -> &mut Self
pub fn operation(&mut self, value: SlackCanvasOperation) -> &mut Self
Sets operation to value.
Sourcepub fn with_operation(self, value: SlackCanvasOperation) -> Self
pub fn with_operation(self, value: SlackCanvasOperation) -> Self
Returns self with operation set to value.
Sourcepub fn section_id(&mut self, value: SlackCanvasSectionId) -> &mut Self
pub fn section_id(&mut self, value: SlackCanvasSectionId) -> &mut Self
Sets section_id to Some(value).
Sourcepub fn reset_section_id(&mut self) -> &mut Self
pub fn reset_section_id(&mut self) -> &mut Self
Sets section_id to None.
Sourcepub fn mopt_section_id(
&mut self,
value: Option<SlackCanvasSectionId>,
) -> &mut Self
pub fn mopt_section_id( &mut self, value: Option<SlackCanvasSectionId>, ) -> &mut Self
Sets section_id to the given Option.
Sourcepub fn with_section_id(self, value: SlackCanvasSectionId) -> Self
pub fn with_section_id(self, value: SlackCanvasSectionId) -> Self
Returns self with section_id set to Some(value).
Sourcepub fn without_section_id(self) -> Self
pub fn without_section_id(self) -> Self
Returns self with section_id set to None.
Sourcepub fn opt_section_id(self, value: Option<SlackCanvasSectionId>) -> Self
pub fn opt_section_id(self, value: Option<SlackCanvasSectionId>) -> Self
Returns self with section_id set to the given Option.
Sourcepub fn document_content(
&mut self,
value: SlackCanvasDocumentContent,
) -> &mut Self
pub fn document_content( &mut self, value: SlackCanvasDocumentContent, ) -> &mut Self
Sets document_content to Some(value).
Sourcepub fn reset_document_content(&mut self) -> &mut Self
pub fn reset_document_content(&mut self) -> &mut Self
Sets document_content to None.
Sourcepub fn mopt_document_content(
&mut self,
value: Option<SlackCanvasDocumentContent>,
) -> &mut Self
pub fn mopt_document_content( &mut self, value: Option<SlackCanvasDocumentContent>, ) -> &mut Self
Sets document_content to the given Option.
Sourcepub fn with_document_content(self, value: SlackCanvasDocumentContent) -> Self
pub fn with_document_content(self, value: SlackCanvasDocumentContent) -> Self
Returns self with document_content set to Some(value).
Sourcepub fn without_document_content(self) -> Self
pub fn without_document_content(self) -> Self
Returns self with document_content set to None.
Sourcepub fn opt_document_content(
self,
value: Option<SlackCanvasDocumentContent>,
) -> Self
pub fn opt_document_content( self, value: Option<SlackCanvasDocumentContent>, ) -> Self
Returns self with document_content set to the given Option.
Sourcepub fn title_content(&mut self, value: SlackCanvasDocumentContent) -> &mut Self
pub fn title_content(&mut self, value: SlackCanvasDocumentContent) -> &mut Self
Sets title_content to Some(value).
Sourcepub fn reset_title_content(&mut self) -> &mut Self
pub fn reset_title_content(&mut self) -> &mut Self
Sets title_content to None.
Sourcepub fn mopt_title_content(
&mut self,
value: Option<SlackCanvasDocumentContent>,
) -> &mut Self
pub fn mopt_title_content( &mut self, value: Option<SlackCanvasDocumentContent>, ) -> &mut Self
Sets title_content to the given Option.
Sourcepub fn with_title_content(self, value: SlackCanvasDocumentContent) -> Self
pub fn with_title_content(self, value: SlackCanvasDocumentContent) -> Self
Returns self with title_content set to Some(value).
Sourcepub fn without_title_content(self) -> Self
pub fn without_title_content(self) -> Self
Returns self with title_content set to None.
Sourcepub fn opt_title_content(
self,
value: Option<SlackCanvasDocumentContent>,
) -> Self
pub fn opt_title_content( self, value: Option<SlackCanvasDocumentContent>, ) -> Self
Returns self with title_content set to the given Option.