pub struct SlackRichTextText {
pub text: String,
pub style: Option<SlackRichTextStyle>,
}Fields§
§text: String§style: Option<SlackRichTextStyle>Implementations§
Source§impl SlackRichTextText
impl SlackRichTextText
Sourcepub fn new(text: String) -> Self
pub fn new(text: String) -> Self
Creates a new SlackRichTextText from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn style(&mut self, value: SlackRichTextStyle) -> &mut Self
pub fn style(&mut self, value: SlackRichTextStyle) -> &mut Self
Sets style to Some(value).
Sourcepub fn reset_style(&mut self) -> &mut Self
pub fn reset_style(&mut self) -> &mut Self
Sets style to None.
Sourcepub fn mopt_style(&mut self, value: Option<SlackRichTextStyle>) -> &mut Self
pub fn mopt_style(&mut self, value: Option<SlackRichTextStyle>) -> &mut Self
Sets style to the given Option.
Sourcepub fn with_style(self, value: SlackRichTextStyle) -> Self
pub fn with_style(self, value: SlackRichTextStyle) -> Self
Returns self with style set to Some(value).
Sourcepub fn without_style(self) -> Self
pub fn without_style(self) -> Self
Returns self with style set to None.
Sourcepub fn opt_style(self, value: Option<SlackRichTextStyle>) -> Self
pub fn opt_style(self, value: Option<SlackRichTextStyle>) -> Self
Returns self with style set to the given Option.
Trait Implementations§
Source§impl Clone for SlackRichTextText
impl Clone for SlackRichTextText
Source§impl Debug for SlackRichTextText
impl Debug for SlackRichTextText
Source§impl<'de> Deserialize<'de> for SlackRichTextText
impl<'de> Deserialize<'de> for SlackRichTextText
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<SlackRichTextText> for SlackRichTextInlineElement
impl From<SlackRichTextText> for SlackRichTextInlineElement
Source§fn from(element: SlackRichTextText) -> Self
fn from(element: SlackRichTextText) -> Self
Converts to this type from the input type.
Source§impl From<SlackRichTextTextInit> for SlackRichTextText
impl From<SlackRichTextTextInit> for SlackRichTextText
Source§fn from(value: SlackRichTextTextInit) -> Self
fn from(value: SlackRichTextTextInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackRichTextText
impl PartialEq for SlackRichTextText
Source§impl Serialize for SlackRichTextText
impl Serialize for SlackRichTextText
impl StructuralPartialEq for SlackRichTextText
Auto Trait Implementations§
impl Freeze for SlackRichTextText
impl RefUnwindSafe for SlackRichTextText
impl Send for SlackRichTextText
impl Sync for SlackRichTextText
impl Unpin for SlackRichTextText
impl UnsafeUnpin for SlackRichTextText
impl UnwindSafe for SlackRichTextText
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