pub struct SlackRichTextLink {
pub url: SlackRelaxedUrl,
pub text: Option<String>,
pub unsafe_: Option<bool>,
pub style: Option<SlackRichTextStyle>,
}Fields§
§url: SlackRelaxedUrl§text: Option<String>§unsafe_: Option<bool>§style: Option<SlackRichTextStyle>Implementations§
Source§impl SlackRichTextLink
impl SlackRichTextLink
Sourcepub fn new(url: SlackRelaxedUrl) -> Self
pub fn new(url: SlackRelaxedUrl) -> Self
Creates a new SlackRichTextLink from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn url(&mut self, value: SlackRelaxedUrl) -> &mut Self
pub fn url(&mut self, value: SlackRelaxedUrl) -> &mut Self
Sets url to value.
Sourcepub fn with_url(self, value: SlackRelaxedUrl) -> Self
pub fn with_url(self, value: SlackRelaxedUrl) -> Self
Returns self with url set to value.
Sourcepub fn reset_text(&mut self) -> &mut Self
pub fn reset_text(&mut self) -> &mut Self
Sets text to None.
Sourcepub fn without_text(self) -> Self
pub fn without_text(self) -> Self
Returns self with text set to None.
Sourcepub fn opt_text(self, value: Option<String>) -> Self
pub fn opt_text(self, value: Option<String>) -> Self
Returns self with text set to the given Option.
Sourcepub fn reset_unsafe_(&mut self) -> &mut Self
pub fn reset_unsafe_(&mut self) -> &mut Self
Sets unsafe_ to None.
Sourcepub fn mopt_unsafe_(&mut self, value: Option<bool>) -> &mut Self
pub fn mopt_unsafe_(&mut self, value: Option<bool>) -> &mut Self
Sets unsafe_ to the given Option.
Sourcepub fn with_unsafe_(self, value: bool) -> Self
pub fn with_unsafe_(self, value: bool) -> Self
Returns self with unsafe_ set to Some(value).
Sourcepub fn without_unsafe_(self) -> Self
pub fn without_unsafe_(self) -> Self
Returns self with unsafe_ set to None.
Sourcepub fn opt_unsafe_(self, value: Option<bool>) -> Self
pub fn opt_unsafe_(self, value: Option<bool>) -> Self
Returns self with unsafe_ 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 SlackRichTextLink
impl Clone for SlackRichTextLink
Source§impl Debug for SlackRichTextLink
impl Debug for SlackRichTextLink
Source§impl<'de> Deserialize<'de> for SlackRichTextLink
impl<'de> Deserialize<'de> for SlackRichTextLink
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<SlackRichTextLink> for SlackRichTextInlineElement
impl From<SlackRichTextLink> for SlackRichTextInlineElement
Source§fn from(element: SlackRichTextLink) -> Self
fn from(element: SlackRichTextLink) -> Self
Converts to this type from the input type.
Source§impl From<SlackRichTextLinkInit> for SlackRichTextLink
impl From<SlackRichTextLinkInit> for SlackRichTextLink
Source§fn from(value: SlackRichTextLinkInit) -> Self
fn from(value: SlackRichTextLinkInit) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SlackRichTextLink
impl PartialEq for SlackRichTextLink
Source§impl Serialize for SlackRichTextLink
impl Serialize for SlackRichTextLink
impl StructuralPartialEq for SlackRichTextLink
Auto Trait Implementations§
impl Freeze for SlackRichTextLink
impl RefUnwindSafe for SlackRichTextLink
impl Send for SlackRichTextLink
impl Sync for SlackRichTextLink
impl Unpin for SlackRichTextLink
impl UnsafeUnpin for SlackRichTextLink
impl UnwindSafe for SlackRichTextLink
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