fhir_rs/datatype/base/
xhtml.rs

1use std::fmt::Display;
2use std::str::FromStr;
3use crate::prelude::{Result, FhirError};
4
5#[derive(Debug, Clone)]
6pub struct Xhtml(pub(crate) String);
7
8
9impl Display for Xhtml {
10    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11        write!(f, "{}", self.0)
12    }
13}
14
15impl FromStr for Xhtml {
16    type Err = FhirError;
17
18    fn from_str(s: &str) -> Result<Self> {
19        Ok(Self(String::from(s)))
20    }
21}