pub enum MarkedString {
String(String),
LanguageString(LanguageString),
}
Expand description
The marked string is rendered:
- as markdown if it is represented as a string
- as code block of the given langauge if it is represented as a pair of a language and a value
The pair of a language and a value is an equivalent to markdown:
${language} ${value}
Variants§
String(String)
LanguageString(LanguageString)
Implementations§
source§impl MarkedString
impl MarkedString
pub fn from_markdown(markdown: String) -> MarkedString
pub fn from_language_code(language: String, code_block: String) -> MarkedString
Trait Implementations§
source§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