use crate::Content;
#[derive(Clone, Debug)]
pub struct Preformatted {
text: String,
alt: Option<Content>,
}
impl Preformatted {
pub fn new<T: Into<String>>(text: T, alt: Option<Content>) -> Self {
Preformatted {
text: text.into(),
alt,
}
}
pub fn text(&self) -> &String {
&self.text
}
pub fn text_mut(&mut self) -> &mut String {
&mut self.text
}
pub fn alt(&self) -> &Option<Content> {
&self.alt
}
pub fn alt_mut(&mut self) -> &mut Option<Content> {
&mut self.alt
}
}