use super::*; pub(crate) struct Iframe { inscription_id: InscriptionId, thumbnail: bool, } impl Iframe { pub(crate) fn thumbnail(inscription_id: InscriptionId) -> Trusted { Trusted(Self { inscription_id, thumbnail: true, }) } pub(crate) fn main(inscription_id: InscriptionId) -> Trusted { Trusted(Self { inscription_id, thumbnail: false, }) } } impl Display for Iframe { fn fmt(&self, f: &mut Formatter) -> fmt::Result { if self.thumbnail { write!(f, "", self.inscription_id)?; } write!( f, "", self.inscription_id )?; if self.thumbnail { write!(f, "",)? } Ok(()) } } #[cfg(test)] mod tests { use super::*; #[test] fn thumbnail() { assert_regex_match!( Iframe::thumbnail(inscription_id(1)) .0.to_string(), "",