1 2 3 4 5 6 7 8 9 10 11 12
/// A text. pub struct Text { #[allow(dead_code)] content: String, } impl Text { /// Create a text. pub fn new<T: Into<String>>(content: T) -> Self { Text { content: content.into() } } }