summaryrefslogtreecommitdiff
path: root/src/span.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/span.rs')
-rw-r--r--src/span.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/span.rs b/src/span.rs
new file mode 100644
index 0000000..5282cae
--- /dev/null
+++ b/src/span.rs
@@ -0,0 +1,11 @@
+pub struct Span {
+ pub tag: String,
+ pub text: String,
+}
+
+impl std::fmt::Debug for Span {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
+ let tag = format!("{:?}", self.tag);
+ write!(f, "{tag:>20}: {:?}", self.text)
+ }
+}