alchemy_lifecycle/rsx/
virtual_text.rs1use std::fmt::{Display, Debug};
4
5#[derive(Clone)]
8pub struct VirtualText(pub String);
9
10impl VirtualText {
11 pub fn new(s: String) -> VirtualText {
13 VirtualText(s)
14 }
15}
16
17impl Display for VirtualText {
18 fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
20 write!(f, "{}", self.0)
21 }
22}
23
24impl Debug for VirtualText {
25 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27 write!(f, "VirtualText({})", self.0)
28 }
29}