pub enum MarkedString {
String(String),
MarkedStringWithLanguage(MarkedStringWithLanguage),
}๐Deprecated:
use MarkupContent instead.
Expand description
MarkedString can be used to render human readable text. It is either a markdown string or a code-block that provides a language and a code snippet. The language identifier is semantically equal to the optional language identifier in fenced code blocks in GitHub issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
The pair of a language and a value is an equivalent to markdown:
${value}Note that markdown strings will be sanitized - that means html will be escaped. @deprecated use MarkupContent instead.
Variantsยง
String(String)
๐Deprecated:
use MarkupContent instead.
MarkedStringWithLanguage(MarkedStringWithLanguage)
๐Deprecated:
use MarkupContent instead.
Trait Implementationsยง
Sourceยงimpl Clone for MarkedString
impl Clone for MarkedString
Sourceยงfn clone(&self) -> MarkedString
fn clone(&self) -> MarkedString
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl Debug for MarkedString
impl Debug for MarkedString
Sourceยงimpl<'de> Deserialize<'de> for MarkedString
impl<'de> Deserialize<'de> for MarkedString
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<&str> for MarkedString
impl From<&str> for MarkedString
Sourceยงimpl From<MarkedString> for Contents
impl From<MarkedString> for Contents
Sourceยงfn from(v: MarkedString) -> Self
fn from(v: MarkedString) -> Self
Converts to this type from the input type.
Sourceยงimpl From<MarkedStringWithLanguage> for MarkedString
impl From<MarkedStringWithLanguage> for MarkedString
Sourceยงfn from(v: MarkedStringWithLanguage) -> Self
fn from(v: MarkedStringWithLanguage) -> Self
Converts to this type from the input type.
Sourceยงimpl From<String> for MarkedString
impl From<String> for MarkedString
Sourceยงimpl From<char> for MarkedString
impl From<char> for MarkedString
Sourceยงimpl Hash for MarkedString
impl Hash for MarkedString
Sourceยงimpl PartialEq for MarkedString
impl PartialEq for MarkedString
Sourceยงfn eq(&self, other: &MarkedString) -> bool
fn eq(&self, other: &MarkedString) -> bool
Tests for
self and other values to be equal, and is used by ==.Sourceยงimpl Serialize for MarkedString
impl Serialize for MarkedString
impl Eq for MarkedString
impl StructuralPartialEq for MarkedString
Auto Trait Implementationsยง
impl Freeze for MarkedString
impl RefUnwindSafe for MarkedString
impl Send for MarkedString
impl Sync for MarkedString
impl Unpin for MarkedString
impl UnsafeUnpin for MarkedString
impl UnwindSafe for MarkedString
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