Struct slack_morphism::prelude::SlackBlockChoiceItem
source · pub struct SlackBlockChoiceItem<T: Into<SlackBlockText>> {
pub text: T,
pub value: String,
pub url: Option<Url>,
}
Fields§
§text: T
§value: String
§url: Option<Url>
Implementations§
source§impl<T: Into<SlackBlockText>> SlackBlockChoiceItem<T>
impl<T: Into<SlackBlockText>> SlackBlockChoiceItem<T>
pub fn new(text: T, value: String) -> Self
pub fn text(&mut self, value: T) -> &mut Self
pub fn with_text(self, value: T) -> Self
pub fn value(&mut self, value: String) -> &mut Self
pub fn with_value(self, value: String) -> Self
pub fn url(&mut self, value: Url) -> &mut Self
pub fn reset_url(&mut self) -> &mut Self
pub fn mopt_url(&mut self, value: Option<Url>) -> &mut Self
pub fn with_url(self, value: Url) -> Self
pub fn without_url(self) -> Self
pub fn opt_url(self, value: Option<Url>) -> Self
Trait Implementations§
source§impl<T: Clone + Into<SlackBlockText>> Clone for SlackBlockChoiceItem<T>
impl<T: Clone + Into<SlackBlockText>> Clone for SlackBlockChoiceItem<T>
source§fn clone(&self) -> SlackBlockChoiceItem<T>
fn clone(&self) -> SlackBlockChoiceItem<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: Debug + Into<SlackBlockText>> Debug for SlackBlockChoiceItem<T>
impl<T: Debug + Into<SlackBlockText>> Debug for SlackBlockChoiceItem<T>
source§impl<'de, T> Deserialize<'de> for SlackBlockChoiceItem<T>
impl<'de, T> Deserialize<'de> for SlackBlockChoiceItem<T>
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<T: Into<SlackBlockText>> From<SlackBlockChoiceItemInit<T>> for SlackBlockChoiceItem<T>
impl<T: Into<SlackBlockText>> From<SlackBlockChoiceItemInit<T>> for SlackBlockChoiceItem<T>
source§fn from(value: SlackBlockChoiceItemInit<T>) -> Self
fn from(value: SlackBlockChoiceItemInit<T>) -> Self
Converts to this type from the input type.
source§impl<T: PartialEq + Into<SlackBlockText>> PartialEq for SlackBlockChoiceItem<T>
impl<T: PartialEq + Into<SlackBlockText>> PartialEq for SlackBlockChoiceItem<T>
source§fn eq(&self, other: &SlackBlockChoiceItem<T>) -> bool
fn eq(&self, other: &SlackBlockChoiceItem<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for SlackBlockChoiceItem<T>
impl<T> Serialize for SlackBlockChoiceItem<T>
impl<T: Into<SlackBlockText>> StructuralPartialEq for SlackBlockChoiceItem<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for SlackBlockChoiceItem<T>where
T: RefUnwindSafe,
impl<T> Send for SlackBlockChoiceItem<T>where
T: Send,
impl<T> Sync for SlackBlockChoiceItem<T>where
T: Sync,
impl<T> Unpin for SlackBlockChoiceItem<T>where
T: Unpin,
impl<T> UnwindSafe for SlackBlockChoiceItem<T>where
T: UnwindSafe,
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