Skip to main content

SlackRichTextStyle

Struct SlackRichTextStyle 

Source
pub struct SlackRichTextStyle {
    pub bold: Option<bool>,
    pub italic: Option<bool>,
    pub strike: Option<bool>,
    pub code: Option<bool>,
    pub underline: Option<bool>,
    pub highlight: Option<bool>,
    pub client_highlight: Option<bool>,
    pub unlink: Option<bool>,
}

Fields§

§bold: Option<bool>§italic: Option<bool>§strike: Option<bool>§code: Option<bool>§underline: Option<bool>§highlight: Option<bool>§client_highlight: Option<bool>§unlink: Option<bool>

Implementations§

Source§

impl SlackRichTextStyle

Source

pub fn new() -> Self

Creates a new SlackRichTextStyle from its required fields. Option fields start as None, and fields with #[default] take their default.

Source

pub fn bold(&mut self, value: bool) -> &mut Self

Sets bold to Some(value).

Source

pub fn reset_bold(&mut self) -> &mut Self

Sets bold to None.

Source

pub fn mopt_bold(&mut self, value: Option<bool>) -> &mut Self

Sets bold to the given Option.

Source

pub fn with_bold(self, value: bool) -> Self

Returns self with bold set to Some(value).

Source

pub fn without_bold(self) -> Self

Returns self with bold set to None.

Source

pub fn opt_bold(self, value: Option<bool>) -> Self

Returns self with bold set to the given Option.

Source

pub fn italic(&mut self, value: bool) -> &mut Self

Sets italic to Some(value).

Source

pub fn reset_italic(&mut self) -> &mut Self

Sets italic to None.

Source

pub fn mopt_italic(&mut self, value: Option<bool>) -> &mut Self

Sets italic to the given Option.

Source

pub fn with_italic(self, value: bool) -> Self

Returns self with italic set to Some(value).

Source

pub fn without_italic(self) -> Self

Returns self with italic set to None.

Source

pub fn opt_italic(self, value: Option<bool>) -> Self

Returns self with italic set to the given Option.

Source

pub fn strike(&mut self, value: bool) -> &mut Self

Sets strike to Some(value).

Source

pub fn reset_strike(&mut self) -> &mut Self

Sets strike to None.

Source

pub fn mopt_strike(&mut self, value: Option<bool>) -> &mut Self

Sets strike to the given Option.

Source

pub fn with_strike(self, value: bool) -> Self

Returns self with strike set to Some(value).

Source

pub fn without_strike(self) -> Self

Returns self with strike set to None.

Source

pub fn opt_strike(self, value: Option<bool>) -> Self

Returns self with strike set to the given Option.

Source

pub fn code(&mut self, value: bool) -> &mut Self

Sets code to Some(value).

Source

pub fn reset_code(&mut self) -> &mut Self

Sets code to None.

Source

pub fn mopt_code(&mut self, value: Option<bool>) -> &mut Self

Sets code to the given Option.

Source

pub fn with_code(self, value: bool) -> Self

Returns self with code set to Some(value).

Source

pub fn without_code(self) -> Self

Returns self with code set to None.

Source

pub fn opt_code(self, value: Option<bool>) -> Self

Returns self with code set to the given Option.

Source

pub fn underline(&mut self, value: bool) -> &mut Self

Sets underline to Some(value).

Source

pub fn reset_underline(&mut self) -> &mut Self

Sets underline to None.

Source

pub fn mopt_underline(&mut self, value: Option<bool>) -> &mut Self

Sets underline to the given Option.

Source

pub fn with_underline(self, value: bool) -> Self

Returns self with underline set to Some(value).

Source

pub fn without_underline(self) -> Self

Returns self with underline set to None.

Source

pub fn opt_underline(self, value: Option<bool>) -> Self

Returns self with underline set to the given Option.

Source

pub fn highlight(&mut self, value: bool) -> &mut Self

Sets highlight to Some(value).

Source

pub fn reset_highlight(&mut self) -> &mut Self

Sets highlight to None.

Source

pub fn mopt_highlight(&mut self, value: Option<bool>) -> &mut Self

Sets highlight to the given Option.

Source

pub fn with_highlight(self, value: bool) -> Self

Returns self with highlight set to Some(value).

Source

pub fn without_highlight(self) -> Self

Returns self with highlight set to None.

Source

pub fn opt_highlight(self, value: Option<bool>) -> Self

Returns self with highlight set to the given Option.

Source

pub fn client_highlight(&mut self, value: bool) -> &mut Self

Sets client_highlight to Some(value).

Source

pub fn reset_client_highlight(&mut self) -> &mut Self

Sets client_highlight to None.

Source

pub fn mopt_client_highlight(&mut self, value: Option<bool>) -> &mut Self

Sets client_highlight to the given Option.

Source

pub fn with_client_highlight(self, value: bool) -> Self

Returns self with client_highlight set to Some(value).

Source

pub fn without_client_highlight(self) -> Self

Returns self with client_highlight set to None.

Source

pub fn opt_client_highlight(self, value: Option<bool>) -> Self

Returns self with client_highlight set to the given Option.

Sets unlink to Some(value).

Sets unlink to None.

Sets unlink to the given Option.

Returns self with unlink set to Some(value).

Returns self with unlink set to None.

Returns self with unlink set to the given Option.

Trait Implementations§

Source§

impl Clone for SlackRichTextStyle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SlackRichTextStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SlackRichTextStyle

Source§

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<SlackRichTextStyleInit> for SlackRichTextStyle

Source§

fn from(value: SlackRichTextStyleInit) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SlackRichTextStyle

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for SlackRichTextStyle

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SlackRichTextStyle

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more