ratatui_toolkit/widgets/markdown_widget/foundation/source/constructors/from_string.rs
1//! Constructor for creating a `MarkdownSource` from a string.
2
3use super::super::MarkdownSource;
4
5impl MarkdownSource {
6 /// Create a new `MarkdownSource` from a string.
7 ///
8 /// # Arguments
9 /// * `s` - The markdown string content.
10 pub fn from_string(s: impl Into<String>) -> Self {
11 Self::String(s.into())
12 }
13}