tsg_core/graph/header.rs
1use std::fmt;
2
3use bon::Builder;
4use bstr::BString;
5
6/// Header information in the TSG file
7#[derive(Debug, Clone, PartialEq, Builder)]
8#[builder(on(BString, into))]
9pub struct Header {
10 pub tag: BString,
11 pub value: BString,
12}
13
14impl fmt::Display for Header {
15 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
16 write!(f, "H\t{}\t{}", self.tag, self.value)
17 }
18}