Enum slack_blocks::text::Text [−][src]
Expand description
Text Object
An object containing some text,
formatted either as plain_text
or using mrkdwn
🔗,
our proprietary textual markup that’s just different enough
from Markdown to frustrate you.
Variants
Mrkdwn(Contents)
Markdown text
Plain(Contents)
Plain text
Implementations
impl Text
[src]
impl Text
[src]pub fn copy_from<T: Into<Self> + Clone>(contents: &T) -> Self
[src]
pub fn copy_from<T: Into<Self> + Clone>(contents: &T) -> Self
[src]Clone the data behind a reference, then convert it into
a Text
Arguments
contents
- Anything that can be cloned into a type that is convertable to aText
- this includes thePlain
andMrkdwn
contents structs. Notably, this doesn’t include a conversion directly from a reference to aString
or a&str
- that’s because assuming which kind of text a string represents could lead to unexpected behavior when that kind of text isn’t valid.
Trait Implementations
impl<'de> Deserialize<'de> for Text
[src]
impl<'de> Deserialize<'de> for Text
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl From<Text> for ImageOrText<'static>
[src]
impl From<Text> for ImageOrText<'static>
[src]impl StructuralPartialEq for Text
[src]
Auto Trait Implementations
impl RefUnwindSafe for Text
impl Send for Text
impl Sync for Text
impl Unpin for Text
impl UnwindSafe for Text
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,