pub struct SlackRichTextDate {
pub timestamp: SlackDateTime,
pub format: String,
pub fallback: Option<String>,
pub style: Option<SlackRichTextStyle>,
}Fields§
§timestamp: SlackDateTime§format: String§fallback: Option<String>§style: Option<SlackRichTextStyle>Implementations§
Source§impl SlackRichTextDate
impl SlackRichTextDate
Sourcepub fn new(timestamp: SlackDateTime, format: String) -> Self
pub fn new(timestamp: SlackDateTime, format: String) -> Self
Creates a new SlackRichTextDate from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn timestamp(&mut self, value: SlackDateTime) -> &mut Self
pub fn timestamp(&mut self, value: SlackDateTime) -> &mut Self
Sets timestamp to value.
Sourcepub fn with_timestamp(self, value: SlackDateTime) -> Self
pub fn with_timestamp(self, value: SlackDateTime) -> Self
Returns self with timestamp set to value.
Sourcepub fn with_format(self, value: String) -> Self
pub fn with_format(self, value: String) -> Self
Returns self with format set to value.
Sourcepub fn reset_fallback(&mut self) -> &mut Self
pub fn reset_fallback(&mut self) -> &mut Self
Sets fallback to None.
Sourcepub fn mopt_fallback(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_fallback(&mut self, value: Option<String>) -> &mut Self
Sets fallback to the given Option.
Sourcepub fn with_fallback(self, value: String) -> Self
pub fn with_fallback(self, value: String) -> Self
Returns self with fallback set to Some(value).
Sourcepub fn without_fallback(self) -> Self
pub fn without_fallback(self) -> Self
Returns self with fallback set to None.
Sourcepub fn opt_fallback(self, value: Option<String>) -> Self
pub fn opt_fallback(self, value: Option<String>) -> Self
Returns self with fallback set to the given Option.
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 SlackRichTextDate
impl Clone for SlackRichTextDate
Source§impl Debug for SlackRichTextDate
impl Debug for SlackRichTextDate
Source§impl<'de> Deserialize<'de> for SlackRichTextDate
impl<'de> Deserialize<'de> for SlackRichTextDate
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<SlackRichTextDate> for SlackRichTextInlineElement
impl From<SlackRichTextDate> for SlackRichTextInlineElement
Source§fn from(element: SlackRichTextDate) -> Self
fn from(element: SlackRichTextDate) -> Self
Converts to this type from the input type.
Source§impl From<SlackRichTextDateInit> for SlackRichTextDate
impl From<SlackRichTextDateInit> for SlackRichTextDate
Source§fn from(value: SlackRichTextDateInit) -> Self
fn from(value: SlackRichTextDateInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackRichTextDate
impl PartialEq for SlackRichTextDate
Source§impl Serialize for SlackRichTextDate
impl Serialize for SlackRichTextDate
impl StructuralPartialEq for SlackRichTextDate
Auto Trait Implementations§
impl Freeze for SlackRichTextDate
impl RefUnwindSafe for SlackRichTextDate
impl Send for SlackRichTextDate
impl Sync for SlackRichTextDate
impl Unpin for SlackRichTextDate
impl UnsafeUnpin for SlackRichTextDate
impl UnwindSafe for SlackRichTextDate
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