pub struct SlackRichTextPreformatted {
pub elements: Vec<SlackRichTextInlineElement>,
pub border: Option<u64>,
pub language: Option<String>,
}Fields§
§elements: Vec<SlackRichTextInlineElement>§border: Option<u64>§language: Option<String>Implementations§
Source§impl SlackRichTextPreformatted
impl SlackRichTextPreformatted
Sourcepub fn new(elements: Vec<SlackRichTextInlineElement>) -> Self
pub fn new(elements: Vec<SlackRichTextInlineElement>) -> Self
Creates a new SlackRichTextPreformatted from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn elements(&mut self, value: Vec<SlackRichTextInlineElement>) -> &mut Self
pub fn elements(&mut self, value: Vec<SlackRichTextInlineElement>) -> &mut Self
Sets elements to value.
Sourcepub fn with_elements(self, value: Vec<SlackRichTextInlineElement>) -> Self
pub fn with_elements(self, value: Vec<SlackRichTextInlineElement>) -> Self
Returns self with elements set to value.
Sourcepub fn reset_border(&mut self) -> &mut Self
pub fn reset_border(&mut self) -> &mut Self
Sets border to None.
Sourcepub fn mopt_border(&mut self, value: Option<u64>) -> &mut Self
pub fn mopt_border(&mut self, value: Option<u64>) -> &mut Self
Sets border to the given Option.
Sourcepub fn with_border(self, value: u64) -> Self
pub fn with_border(self, value: u64) -> Self
Returns self with border set to Some(value).
Sourcepub fn without_border(self) -> Self
pub fn without_border(self) -> Self
Returns self with border set to None.
Sourcepub fn opt_border(self, value: Option<u64>) -> Self
pub fn opt_border(self, value: Option<u64>) -> Self
Returns self with border set to the given Option.
Sourcepub fn reset_language(&mut self) -> &mut Self
pub fn reset_language(&mut self) -> &mut Self
Sets language to None.
Sourcepub fn mopt_language(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_language(&mut self, value: Option<String>) -> &mut Self
Sets language to the given Option.
Sourcepub fn with_language(self, value: String) -> Self
pub fn with_language(self, value: String) -> Self
Returns self with language set to Some(value).
Sourcepub fn without_language(self) -> Self
pub fn without_language(self) -> Self
Returns self with language set to None.
Sourcepub fn opt_language(self, value: Option<String>) -> Self
pub fn opt_language(self, value: Option<String>) -> Self
Returns self with language set to the given Option.
Trait Implementations§
Source§impl Clone for SlackRichTextPreformatted
impl Clone for SlackRichTextPreformatted
Source§impl Debug for SlackRichTextPreformatted
impl Debug for SlackRichTextPreformatted
Source§impl<'de> Deserialize<'de> for SlackRichTextPreformatted
impl<'de> Deserialize<'de> for SlackRichTextPreformatted
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<SlackRichTextPreformatted> for SlackRichTextElement
impl From<SlackRichTextPreformatted> for SlackRichTextElement
Source§fn from(element: SlackRichTextPreformatted) -> Self
fn from(element: SlackRichTextPreformatted) -> Self
Converts to this type from the input type.
Source§impl From<SlackRichTextPreformattedInit> for SlackRichTextPreformatted
impl From<SlackRichTextPreformattedInit> for SlackRichTextPreformatted
Source§fn from(value: SlackRichTextPreformattedInit) -> Self
fn from(value: SlackRichTextPreformattedInit) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for SlackRichTextPreformatted
Auto Trait Implementations§
impl Freeze for SlackRichTextPreformatted
impl RefUnwindSafe for SlackRichTextPreformatted
impl Send for SlackRichTextPreformatted
impl Sync for SlackRichTextPreformatted
impl Unpin for SlackRichTextPreformatted
impl UnsafeUnpin for SlackRichTextPreformatted
impl UnwindSafe for SlackRichTextPreformatted
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