pub struct DateElement {
pub timestamp: i64,
pub format: String,
pub timezone: Option<String>,
pub url: Option<String>,
pub fallback: Option<String>,
pub style: Option<RichTextStyle>,
/* private fields */
}Expand description
A date formatted for the viewer’s locale and time zone. https://docs.slack.dev/reference/block-kit/block-elements/date-element
Fields§
§timestamp: i64§format: String§timezone: Option<String>§url: Option<String>§fallback: Option<String>§style: Option<RichTextStyle>Implementations§
Source§impl DateElement
impl DateElement
pub fn new(timestamp: i64, format: impl Into<String>) -> Self
pub fn timezone(self, timezone: impl Into<String>) -> Self
pub fn url(self, url: impl Into<String>) -> Self
pub fn fallback(self, fallback: impl Into<String>) -> Self
pub fn style(self, style: RichTextStyle) -> Self
Trait Implementations§
Source§impl Clone for DateElement
impl Clone for DateElement
Source§impl Debug for DateElement
impl Debug for DateElement
Source§impl<'de> Deserialize<'de> for DateElement
impl<'de> Deserialize<'de> for DateElement
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<DateElement> for RichTextElement
impl From<DateElement> for RichTextElement
Source§fn from(value: DateElement) -> Self
fn from(value: DateElement) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DateElement
impl PartialEq for DateElement
Source§impl Serialize for DateElement
impl Serialize for DateElement
impl StructuralPartialEq for DateElement
Auto Trait Implementations§
impl Freeze for DateElement
impl RefUnwindSafe for DateElement
impl Send for DateElement
impl Sync for DateElement
impl Unpin for DateElement
impl UnsafeUnpin for DateElement
impl UnwindSafe for DateElement
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